From: sbh Date: Thu, 29 Jan 2015 17:10:00 +0000 (+0300) Subject: Updated documentation X-Git-Tag: V_1.0.0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=85ca51b94bad5853150622699368be3137acc00e;p=modules%2Fshaper.git Updated documentation --- diff --git a/doc/doxyfile.in b/doc/doxyfile.in index 56cda9b0b..5f96a4dc1 100644 --- a/doc/doxyfile.in +++ b/doc/doxyfile.in @@ -691,7 +691,8 @@ FILE_PATTERNS = *.h \ *.cpp \ *.hxx \ *.cxx \ - *.doc + *.doc \ + *.py # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -719,7 +720,8 @@ EXCLUDE_SYMLINKS = NO # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = */Test/*.py +# (Python unit tests excluded) # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h index fe64ca058..5e6cc4bc8 100644 --- a/src/Config/Config_Prop.h +++ b/src/Config/Config_Prop.h @@ -52,6 +52,7 @@ class Config_Prop * Creates a one property * \param theSection - name of section (domain of using) of the property. * \param theName - name (title) of the value. + * \param theTitle - title of the value * \param theType - type of the value. * \param theDefaultValue - default value of the property. This is an initial property value */ diff --git a/src/Config/Config_PropManager.h b/src/Config/Config_PropManager.h index 751e3f446..c6bba0810 100644 --- a/src/Config/Config_PropManager.h +++ b/src/Config/Config_PropManager.h @@ -27,6 +27,7 @@ class Config_PropManager * Registers property parameters * \param theSection - name of section (domain of using) of the property. * \param theName - name (title) of the value. + * \param theTitle - title of the value. * \param theType - type of the value. * \param theDefValue - default and initial value of the property * Returns True if the property succesfully registered diff --git a/src/Config/Config_SelectionFilterMessage.h b/src/Config/Config_SelectionFilterMessage.h index 3f4039e73..ed661b93c 100644 --- a/src/Config/Config_SelectionFilterMessage.h +++ b/src/Config/Config_SelectionFilterMessage.h @@ -32,6 +32,11 @@ class Config_SelectionFilterMessage : public Events_Message std::list myFilterParameters; public: + /*! + * Constructor. + * \param theId - Events_ID of the message + * \param theParent - pointer to the sender + */ CONFIG_EXPORT Config_SelectionFilterMessage(const Events_ID theId, const void* theParent = 0); CONFIG_EXPORT virtual ~Config_SelectionFilterMessage(); diff --git a/src/Config/Config_ValidatorMessage.h b/src/Config/Config_ValidatorMessage.h index e21b1f9fd..99650e22e 100644 --- a/src/Config/Config_ValidatorMessage.h +++ b/src/Config/Config_ValidatorMessage.h @@ -32,6 +32,11 @@ class Config_ValidatorMessage : public Events_Message std::list myVaidatorParameters; public: + /*! + * Constructor. + * \param theId - Events_ID of the message + * \param theParent - pointer to the sender + */ CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void* theParent = 0); CONFIG_EXPORT virtual ~Config_ValidatorMessage(); diff --git a/src/Config/Config_WidgetReader.h b/src/Config/Config_WidgetReader.h index 339b3ad21..a95d8b805 100644 --- a/src/Config/Config_WidgetReader.h +++ b/src/Config/Config_WidgetReader.h @@ -25,6 +25,10 @@ class Config_WidgetReader : public Config_XMLReader { public: + /*! + * Constructor + * \param theXmlFile - full path to the xml file which will be processed by the reader + */ CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile); CONFIG_EXPORT virtual ~Config_WidgetReader(); diff --git a/src/Config/Config_XMLReader.h b/src/Config/Config_XMLReader.h index 1a75184b6..01e64c394 100644 --- a/src/Config/Config_XMLReader.h +++ b/src/Config/Config_XMLReader.h @@ -36,6 +36,10 @@ struct _xmlDoc; class Config_XMLReader { public: + /*! + * Constructor + * \param theXmlFile - full path to the xml file which will be processed by the reader + */ CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile); CONFIG_EXPORT virtual ~Config_XMLReader(); /*! diff --git a/src/ConnectorPlugin/ConnectorPlugin.py b/src/ConnectorPlugin/ConnectorPlugin.py index b532bbd7c..345e4f8c0 100644 --- a/src/ConnectorPlugin/ConnectorPlugin.py +++ b/src/ConnectorPlugin/ConnectorPlugin.py @@ -1,25 +1,29 @@ -""" -Copyright (C) 2014-20xx CEA/DEN, EDF R&D -""" +## @package Plugins +# Python plugin for exporting entities into Salome's GEOM module +# Copyright (C) 2014-20xx CEA/DEN, EDF R&D import ModelAPI from ConnectorPlugin_ExportFeature import ExportFeature - +## @ingroup Plugins +# The main class for management the construction features as plugin. class ConnectorPlugin(ModelAPI.ModelAPI_Plugin): + ## The constructor. def __init__(self): ModelAPI.ModelAPI_Plugin.__init__(self) pass + ## Creates the feature objects of this plugin by the feature string ID. def createFeature(self, theFeatureID): if theFeatureID == ExportFeature.ID(): return ExportFeature().__disown__() else: print "ConnectorPlugin: No such feature %s" % theFeatureID +## The plugin created on module importing (from c++) plugin = ConnectorPlugin() +## Main session of the application aSession = ModelAPI.ModelAPI_Session.get() -print "Module loaded. Session", aSession aSession.registerPlugin(plugin) diff --git a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py index c6f9d8c0f..e69b259fe 100644 --- a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py +++ b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py @@ -1,6 +1,6 @@ -""" -Copyright (C) 2014-20xx CEA/DEN, EDF R&D -""" +## @package Plugins +# ExportFeature class definition +# Copyright (C) 2014-20xx CEA/DEN, EDF R&D import EventsAPI import ModelAPI @@ -9,34 +9,37 @@ import salome from salome.geom import geomBuilder +## @ingroup Plugins +# Feature to export all shapes and groups into the GEOM module class ExportFeature(ModelAPI.ModelAPI_Feature): - "Feature to create a box by drawing a sketch and extruding it" - + ## The constructor. def __init__(self): ModelAPI.ModelAPI_Feature.__init__(self) @staticmethod + ## Export kind. Static. def ID(): return "ExportToGEOM" + ## Returns the kind of a feature. def getKind(self): return ExportFeature.ID() - # This feature is action: has no property pannel and executes immideately + ## This feature is action: has no property pannel and executes immideately. def isAction(self): return True - # The action is not placed into the histiry anyway + # The action is not placed into the history anyway #def isInHistory(self): # return False + ## This feature has no attributes, as it is action. def initAttributes(self): - # This feature has no attributes, it is action pass - + + ## Exports all bodies def exportBodies(self): - # Get all bodies kResultBodyType = "Bodies" aPartSize = self.Part.size(kResultBodyType) if aPartSize == 0: @@ -56,6 +59,7 @@ class ExportFeature(ModelAPI.ModelAPI_Feature): self.geompy.addToStudy(aBrep, "NewGeomShape_{0}".format(idx + 1)) self.geomObjects.append([aShape, aBrep]) + ## Exports all groups def exportGroups(self): # iterate all features to find groups aFeaturesNum = self.Part.size("Features") @@ -68,7 +72,10 @@ class ExportFeature(ModelAPI.ModelAPI_Feature): groupIndex = groupIndex + 1 self.createGroupFromList(aSelectionList, "NewGeomGroup_{0}".format(groupIndex)) - def createGroupFromList(self, theSelectionList, theGroupName): + ## Creates a group by given list of selected objects and the name + # @param theSelectionList: list of selected objects + # @param theGroupName: name of the group to create + def createGroupFromList(self, theSelectionList, theGroupName): # iterate on all selected entities of the group # and get the corresponding ID aSelectionNum = theSelectionList.size() @@ -95,10 +102,14 @@ class ExportFeature(ModelAPI.ModelAPI_Feature): self.geompy.UnionIDs(aGroup,Ids) self.geompy.addToStudyInFather(obj[1], aGroup, theGroupName) + ## Exports all shapes and groups into the GEOM module. def execute(self): aSession = ModelAPI.ModelAPI_Session.get() + ## Get active document self.Part = aSession.activeDocument() + ## List of objects created in the old geom for later use self.geomObjects = [] + ## geomBuilder tool self.geompy = geomBuilder.New(salome.myStudy) # Export bodies and groups