*.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.
# 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
* 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
*/
* 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
std::list<std::string> 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();
std::list<std::string> 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();
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();
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();
/*!
-"""
-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)
-"""
-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
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:
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")
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()
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