From 88ca95388a92f9bbe96d81bf5b1456ca1179100e Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 27 Jan 2015 11:57:42 +0300 Subject: [PATCH] Update the doxygen documentation for plugins --- .../ConstructionPlugin_Plane.h | 4 +-- .../ConstructionPlugin_Plugin.h | 8 ++++-- src/Events/Events_Error.h | 17 ++++++++++-- src/Events/Events_LongOp.h | 6 +++-- src/Events/Events_Loop.h | 1 + .../ExchangePlugin_ImportFeature.h | 10 ++++++- src/ExchangePlugin/ExchangePlugin_Plugin.h | 4 +++ .../ExchangePlugin_Validators.cpp | 17 ------------ .../ExchangePlugin_Validators.h | 18 ++++++++++--- src/FeaturesPlugin/FeaturesPlugin_Boolean.h | 10 +++++-- src/FeaturesPlugin/FeaturesPlugin_Extrusion.h | 9 +++++++ src/FeaturesPlugin/FeaturesPlugin_Group.h | 13 ++++----- src/FeaturesPlugin/FeaturesPlugin_Placement.h | 8 ++++++ src/FeaturesPlugin/FeaturesPlugin_Plugin.h | 5 ++++ src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp | 6 ----- src/GeomAPI/GeomAPI_DataMapOfShapeShape.h | 3 +-- src/GeomAPI/GeomAPI_ICustomPrs.h | 1 + src/GeomAPI/GeomAPI_PlanarEdges.h | 27 +++++++++++++------ src/GeomAPI/GeomAPI_Shape.h | 2 ++ src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h | 9 +++---- src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp | 3 --- src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h | 15 ++++++----- src/PartSetPlugin/PartSetPlugin_Plugin.h | 4 +++ src/SketchPlugin/SketchPlugin_Feature.h | 1 + .../SketchPlugin_ResultValidators.h | 25 +++++++++++++++-- src/SketchPlugin/SketchPlugin_Sketch.h | 8 ------ src/SketchPlugin/SketchPlugin_Validators.h | 10 ++++++- src/SketchSolver/SketchSolver_Constraint.h | 4 ++- .../SketchSolver_ConstraintGroup.cpp | 4 +-- .../SketchSolver_ConstraintGroup.h | 5 ++++ src/SketchSolver/SketchSolver_Solver.h | 3 +++ 31 files changed, 177 insertions(+), 83 deletions(-) diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index e58dd2ec4..369f20586 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -20,9 +20,9 @@ const std::string FACE_ATTR = "planeFace"; /// attribute name for distance const std::string DISTANCE_ATTR = "distance"; -/**\class ConstructionPlugin_Axis +/**\class ConstructionPlugin_Plane * \ingroup DataModel - * \brief Feature for creation of the new axis in PartSet. + * \brief Feature for creation of the new planar surface in PartSet. */ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustomPrs { diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plugin.h b/src/ConstructionPlugin/ConstructionPlugin_Plugin.h index 39f2449fc..a7ec72fc4 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plugin.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plugin.h @@ -11,13 +11,17 @@ #include "ModelAPI_Plugin.h" #include "ModelAPI_Feature.h" +/**\class ConstructionPlugin_Plugin + * \ingroup Plugins + * \brief The main class for management the construction features as plugin. + */ class CONSTRUCTIONPLUGIN_EXPORT ConstructionPlugin_Plugin : public ModelAPI_Plugin { - public: +public: /// Creates the feature object of this plugin by the feature string ID virtual FeaturePtr createFeature(std::string theFeatureID); - public: + /// Default constructor ConstructionPlugin_Plugin(); }; diff --git a/src/Events/Events_Error.h b/src/Events/Events_Error.h index d3222a28e..561c987ce 100644 --- a/src/Events/Events_Error.h +++ b/src/Events/Events_Error.h @@ -15,19 +15,32 @@ #include +/**\class Events_Error + * \ingroup EventsLoop + * \brief An error message event. + * + * Is generated by any algorithm or GUI of the application to inform the user about + * the problem. In GUI mode all such errors are collected in the message log window. + */ class EVENTS_EXPORT Events_Error : public Events_Message { char* myDescription; ///< pointer to the description of the error - public: +public: + /// default destructor virtual ~Events_Error(); + /// Identifier of this event (one for all errors) static Events_ID errorID(); + /// Specific error string char* description() const; + /// Allows to send an error quickly: it creates and sends the error object automatically static void send(char* theDescription, const void* theSender = 0); + /// Allows to send an error quickly: it creates and sends the error object automatically static void send(std::string theDescription, const void* theSender = 0); - protected: +protected: + /// Default constructor. Use "send" message for generation an error. Events_Error(char* theDescription, const void* theSender = 0); }; diff --git a/src/Events/Events_LongOp.h b/src/Events/Events_LongOp.h index f8e5dd8f2..c2e6c2e2e 100644 --- a/src/Events/Events_LongOp.h +++ b/src/Events/Events_LongOp.h @@ -16,7 +16,8 @@ */ class EVENTS_EXPORT Events_LongOp : public Events_Message { - public: +public: + /// Default destructor virtual ~Events_LongOp(); /// Returns the identifier of this event static Events_ID eventID(); @@ -27,7 +28,8 @@ class EVENTS_EXPORT Events_LongOp : public Events_Message /// Returns true if the long operation is performed static bool isPerformed(); - protected: +protected: + /// Default constructor. Use "start" and "end" for generation. Events_LongOp(void* theSender = 0); }; diff --git a/src/Events/Events_Loop.h b/src/Events/Events_Loop.h index af5a0c0dd..a11426f1b 100644 --- a/src/Events/Events_Loop.h +++ b/src/Events/Events_Loop.h @@ -54,6 +54,7 @@ class Events_Loop EVENTS_EXPORT static Events_ID eventByName(const char* theName); //! Allows to send an event + //! \param theMessage the enevt message to send //! \param isGroup is true for grouping messages if possible EVENTS_EXPORT void send(const std::shared_ptr& theMessage, bool isGroup = true); diff --git a/src/ExchangePlugin/ExchangePlugin_ImportFeature.h b/src/ExchangePlugin/ExchangePlugin_ImportFeature.h index f62fee937..24bd6964f 100644 --- a/src/ExchangePlugin/ExchangePlugin_ImportFeature.h +++ b/src/ExchangePlugin/ExchangePlugin_ImportFeature.h @@ -8,6 +8,12 @@ #include +/**\class ExchangePlugin_ImportFeature + * \ingroup Plugins + * \brief Feature for import shapes from the external files in CAD formats. + * + * The set of supported formats is defined in the configuration file. + */ class ExchangePlugin_ImportFeature : public ModelAPI_Feature { public: @@ -23,8 +29,9 @@ class ExchangePlugin_ImportFeature : public ModelAPI_Feature static const std::string MY_FILE_PATH_ID("import_file_selector"); return MY_FILE_PATH_ID; } - + /// default constructor EXCHANGEPLUGIN_EXPORT ExchangePlugin_ImportFeature(); + /// default destructor EXCHANGEPLUGIN_EXPORT virtual ~ExchangePlugin_ImportFeature(); /// Returns the unique kind of a feature @@ -42,6 +49,7 @@ class ExchangePlugin_ImportFeature : public ModelAPI_Feature } protected: + /// POerforms the import of the file EXCHANGEPLUGIN_EXPORT bool importFile(const std::string& theFileName); private: diff --git a/src/ExchangePlugin/ExchangePlugin_Plugin.h b/src/ExchangePlugin/ExchangePlugin_Plugin.h index 89531bd8a..97e1534c7 100644 --- a/src/ExchangePlugin/ExchangePlugin_Plugin.h +++ b/src/ExchangePlugin/ExchangePlugin_Plugin.h @@ -11,6 +11,10 @@ #include #include +/**\class ExchangePlugin_Plugin + * \ingroup Plugins + * \brief The main class for management the import and export operations as plugin. + */ class EXCHANGEPLUGIN_EXPORT ExchangePlugin_Plugin : public ModelAPI_Plugin { public: diff --git a/src/ExchangePlugin/ExchangePlugin_Validators.cpp b/src/ExchangePlugin/ExchangePlugin_Validators.cpp index e708041a8..c001a0c3f 100644 --- a/src/ExchangePlugin/ExchangePlugin_Validators.cpp +++ b/src/ExchangePlugin/ExchangePlugin_Validators.cpp @@ -33,23 +33,6 @@ bool ExchangePlugin_ImportFormatValidator::parseFormats(const std::list& theArguments, - std::list& outPlugins) -{ - std::list::const_iterator it = theArguments.begin(); - bool result = true; - for (; it != theArguments.end(); ++it) { - std::string anArg = *it; - int aSepPos = anArg.find(":"); - if (aSepPos == std::string::npos) { - result = false; - continue; - } - outPlugins.push_back(anArg.substr(aSepPos + 1)); - } - return result; -} - bool ExchangePlugin_ImportFormatValidator::isValid(const AttributePtr& theAttribute, const std::list& theArguments) const { diff --git a/src/ExchangePlugin/ExchangePlugin_Validators.h b/src/ExchangePlugin/ExchangePlugin_Validators.h index 1e93f95ac..f8db19fc2 100644 --- a/src/ExchangePlugin/ExchangePlugin_Validators.h +++ b/src/ExchangePlugin/ExchangePlugin_Validators.h @@ -10,18 +10,28 @@ #include "ExchangePlugin.h" #include +/**\class ExchangePlugin_ImportFormatValidator + * \ingroup Validators + * \brief Validator for the imported formats checking + * + * The configuration file of import/export features contains the information + * about which formats are supported and the extension of the associated files. + * This validator filters out files that are out of this description. + */ class ExchangePlugin_ImportFormatValidator : public ModelAPI_AttributeValidator { - /* + /** * Parses input arguments "BREP:BREPImport", "STEP:STEPImport" * into list of file formats "BREP","STEP" * and list of corresponding plugins: "BREPImport", "STEPImport" */ static bool parseFormats(const std::list& theArguments, std::list& outFormats); - static bool parsePlugins(const std::list& theArguments, - std::list& outPlugins); - public: +public: + /** + * Returns true is the file-name attribute correctly corresponds to the set of + * allowed formats. + */ virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments) const; diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.h b/src/FeaturesPlugin/FeaturesPlugin_Boolean.h index 824dcd0db..65ad15d2e 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.h @@ -12,9 +12,16 @@ #include #include +/**\class FeaturesPlugin_Boolean + * \ingroup Plugins + * \brief Feature for applying of Boolean operations on Solids. + * + * Supports three kinds of Boolean operations: Cut, Fuse and Common. + * For all of them requires two Solids: object and tool. + */ class FeaturesPlugin_Boolean : public ModelAPI_Feature { - public: +public: /// Extrusion kind inline static const std::string& ID() { @@ -46,7 +53,6 @@ class FeaturesPlugin_Boolean : public ModelAPI_Feature BOOL_COMMON }; - /// Returns the kind of a feature FEATURESPLUGIN_EXPORT virtual const std::string& getKind() { diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h index 8199fcb2e..bbc636c92 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h @@ -12,6 +12,15 @@ #include #include #include + +/**\class FeaturesPlugin_Extrusion + * \ingroup Plugins + * \brief Feature for creation of extrusion from the planar face. + * + * Extrusion creates the lateral faces based on edges of the base face and + * the top face equal to the base face. Direction of extrusion is taken from the face + * plane, but can be corrected by the "reverse" flag. + */ class FeaturesPlugin_Extrusion : public ModelAPI_Feature { public: diff --git a/src/FeaturesPlugin/FeaturesPlugin_Group.h b/src/FeaturesPlugin/FeaturesPlugin_Group.h index e859d5e89..50f82339a 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Group.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Group.h @@ -11,6 +11,13 @@ #include #include +/**\class FeaturesPlugin_Group + * \ingroup Plugins + * \brief Feature for selection of sub-shapes of some shapes. + * + * All selected sub-shapes must be of equal type (vertex, edge, face, etc) but may + * be selected on different objects. + */ class FeaturesPlugin_Group : public ModelAPI_Feature { public: @@ -20,12 +27,6 @@ class FeaturesPlugin_Group : public ModelAPI_Feature static const std::string MY_GROUP_ID("Group"); return MY_GROUP_ID; } - /// attribute name of group name - //inline static const std::string& NAME_ID() - //{ - // static const std::string MY_GROUP_NAME_ID("group_name"); - // return MY_GROUP_NAME_ID; - //} /// attribute name of selected entities list inline static const std::string& LIST_ID() { diff --git a/src/FeaturesPlugin/FeaturesPlugin_Placement.h b/src/FeaturesPlugin/FeaturesPlugin_Placement.h index 3cfd35887..e96541de3 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Placement.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Placement.h @@ -14,6 +14,14 @@ class ModelAPI_ResultBody; class GeomAPI_Shape; +/**\class FeaturesPlugin_Placement + * \ingroup Plugins + * \brief Feature for applying of placement operation: relative movement of Solid. + * + * Locates the selected attractable_face of the solid in the middle of the selected + * placement_base face. Faces must be planar. Orientation of the placed solid is + * depended on the underlied planes of both faces. + */ class FeaturesPlugin_Placement : public ModelAPI_Feature { public: diff --git a/src/FeaturesPlugin/FeaturesPlugin_Plugin.h b/src/FeaturesPlugin/FeaturesPlugin_Plugin.h index 651de9bad..64750feed 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Plugin.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Plugin.h @@ -11,6 +11,10 @@ #include #include +/**\class FeaturesPlugin_Plugin + * \ingroup Plugins + * \brief The main class for management the 3D features as plugin. + */ class FEATURESPLUGIN_EXPORT FeaturesPlugin_Plugin : public ModelAPI_Plugin { public: @@ -18,6 +22,7 @@ class FEATURESPLUGIN_EXPORT FeaturesPlugin_Plugin : public ModelAPI_Plugin virtual FeaturePtr createFeature(std::string theFeatureID); public: + /// Default constructor FeaturesPlugin_Plugin(); }; diff --git a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp index c42ef1562..97e3f1068 100644 --- a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp +++ b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp @@ -14,19 +14,16 @@ using namespace std; GeomAPI_DataMapOfShapeShape::GeomAPI_DataMapOfShapeShape() :GeomAPI_Interface((void *)new TopTools_DataMapOfShapeShape){} -/// Clear void GeomAPI_DataMapOfShapeShape::clear() { implPtr()->Clear(); } -/// Size int GeomAPI_DataMapOfShapeShape::size() { return implPtr()->Extent(); } -/// Adds the Key to the Map with the Item. Returns True if the Key was not already in the map bool GeomAPI_DataMapOfShapeShape::bind (std::shared_ptr theKey, std::shared_ptr theItem) { bool flag(false); @@ -35,7 +32,6 @@ bool GeomAPI_DataMapOfShapeShape::bind (std::shared_ptr theKey, s return flag; } -/// Returns true if theKey is stored in the map. bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr theKey) { bool flag(false); @@ -44,7 +40,6 @@ bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr theKey return flag; } -/// Returns the Item stored with the Key in the Map. To be checked before with isBound() const std::shared_ptr GeomAPI_DataMapOfShapeShape::find(std::shared_ptr theKey) { std::shared_ptr aShape(new GeomAPI_Shape()); @@ -52,7 +47,6 @@ const std::shared_ptr GeomAPI_DataMapOfShapeShape::find(std::shar return aShape; } -/// Removes the Key from the map. Returns true if the Key was in the Map bool GeomAPI_DataMapOfShapeShape::unBind(std::shared_ptr theKey) { bool flag(false); diff --git a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h index 40c447bae..24d3db14e 100644 --- a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h +++ b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h @@ -17,7 +17,6 @@ class GeomAPI_Dir; * \ingroup DataModel * \brief DataMap of Shape - Shape defined by TopoDS_Shapes */ - class GEOMAPI_EXPORT GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface { public: @@ -30,7 +29,7 @@ class GEOMAPI_EXPORT GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface /// Size of the map int size(); - /// Adds the Key to the Map with the Item. Returns True if the Key was not already in the map + /// Adds \a theKey to me with \a theItem. Returns True if the Key was not already in the map bool bind (std::shared_ptr theKey, std::shared_ptr theItem); /// Returns true if theKey is stored in the map. diff --git a/src/GeomAPI/GeomAPI_ICustomPrs.h b/src/GeomAPI/GeomAPI_ICustomPrs.h index c398a33bc..cbed444b7 100644 --- a/src/GeomAPI/GeomAPI_ICustomPrs.h +++ b/src/GeomAPI/GeomAPI_ICustomPrs.h @@ -16,6 +16,7 @@ class GeomAPI_ICustomPrs { public: + /// Modifies the given presentation in the custom way. virtual void customisePresentation(AISObjectPtr thePrs) = 0; }; diff --git a/src/GeomAPI/GeomAPI_PlanarEdges.h b/src/GeomAPI/GeomAPI_PlanarEdges.h index a9cd54a31..627bc5d71 100644 --- a/src/GeomAPI/GeomAPI_PlanarEdges.h +++ b/src/GeomAPI/GeomAPI_PlanarEdges.h @@ -18,47 +18,58 @@ /**\class GeomAPI_PlanarEdges * \ingroup DataModel - * \brief Interface to the edge object + * \brief Interface to the set of edges located in one plane + * + * Normally this interface corresponds to theedges of the sketch */ - class GeomAPI_PlanarEdges : public GeomAPI_Shape { public: /// Creation of empty (null) shape GEOMAPI_EXPORT GeomAPI_PlanarEdges(); + /// Returns whether the shape is alone vertex GEOMAPI_EXPORT virtual bool isVertex() const; - /// Returns whether the shape is an edge + /// Returns whether the shape is alone edge GEOMAPI_EXPORT virtual bool isEdge() const; - + /// Appends the edge to the set GEOMAPI_EXPORT void addEdge(std::shared_ptr theEdge); + /// Returns the list of edges in this interface GEOMAPI_EXPORT std::list > getEdges(); /// Returns True if the wire is defined in a plane GEOMAPI_EXPORT bool hasPlane() const; - /// Set/Get origin point + /// Sets origin point GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin); + /// Returns the plane origin point GEOMAPI_EXPORT std::shared_ptr origin() const; - /// Set/Get X direction vector + /// Sets X direction vector GEOMAPI_EXPORT void setDirX(const std::shared_ptr& theDirX); + /// Returns X direction vector GEOMAPI_EXPORT std::shared_ptr dirX() const; - /// Set/Get Y direction vector + /// Sets Y direction vector GEOMAPI_EXPORT void setDirY(const std::shared_ptr& theDirY); + /// Returns Y direction vector GEOMAPI_EXPORT std::shared_ptr dirY() const; - /// Set/Get Normal direction vector + /// Sets Z direction vector GEOMAPI_EXPORT void setNorm(const std::shared_ptr& theNorm); + /// Returns Z direction vector GEOMAPI_EXPORT std::shared_ptr norm() const; private: + /// Origin point of the plane std::shared_ptr myOrigin; + /// The X direction inside of the plane std::shared_ptr myDirX; + /// The Y direction inside of the plane std::shared_ptr myDirY; + /// The normal direction to the plane std::shared_ptr myNorm; }; diff --git a/src/GeomAPI/GeomAPI_Shape.h b/src/GeomAPI/GeomAPI_Shape.h index 8ff96d981..8e2c22f9a 100644 --- a/src/GeomAPI/GeomAPI_Shape.h +++ b/src/GeomAPI/GeomAPI_Shape.h @@ -21,6 +21,7 @@ class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface /// Creation of empty (null) shape GeomAPI_Shape(); + /// Returns true if the underlied shape is null bool isNull() const; /// Returns whether the shapes are equal @@ -40,6 +41,7 @@ class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface bool computeSize(double& theXmin, double& theYmin, double& theZmin, double& theXmax, double& theYmax, double& theZmax) const; + /// Returns the shape as BRep stream std::string getShapeStream() const; }; diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h index ac7b267d0..a8a5659de 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h @@ -20,16 +20,16 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface { public: - /* \brief Creates cut boolean operation + /**\brief Creates cut boolean operation * \param[in] theShape the main shape * \param[in] theTool toole shape for boolean * \return a solid as result of operation */ GEOMALGOAPI_EXPORT static std::shared_ptr makeCut( std::shared_ptr theShape, - std::shared_ptr theTool); + std::shared_ptr theTool); - /* \brief Creates fuse boolean operation + /**\brief Creates fuse boolean operation * \param[in] theShape the main shape * \param[in] theTool second shape * \return a solid as result of operation @@ -38,10 +38,9 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface std::shared_ptr theShape, std::shared_ptr theTool); - /* \brief Creates common boolean operation + /**\brief Creates common boolean operation * \param[in] theObject the main shape * \param[in] theTool second shape - * \param[in] theType type of the operation: Fuse, Cut, Common * \return a solid as result of operation */ GEOMALGOAPI_EXPORT static std::shared_ptr makeCommon( diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp index f28779de5..4682f1fb0 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp @@ -27,7 +27,6 @@ const std::shared_ptr GeomAlgoAPI_MakeShape::shape() const return myShape; } -/// Returns the list of shapes generated from the shape void GeomAlgoAPI_MakeShape::generated( const std::shared_ptr theShape, ListOfShape& theHistory) { @@ -43,7 +42,6 @@ void GeomAlgoAPI_MakeShape::generated( } } -/// Returns the list of shapes modified from the shape void GeomAlgoAPI_MakeShape::modified( const std::shared_ptr theShape, ListOfShape& theHistory) { @@ -59,7 +57,6 @@ void GeomAlgoAPI_MakeShape::modified( } } -/// Returns whether the shape is an edge bool GeomAlgoAPI_MakeShape::isDeleted(const std::shared_ptr theShape) { bool isDeleted(false); diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h index 25812634c..4082464af 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h @@ -9,36 +9,37 @@ #include #include #include -//#include + /**\class GeomAlgoAPI_MakeShape * \ingroup DataModel * \brief Interface to the root class of all topological shapes constructions */ class GeomAlgoAPI_MakeShape : public GeomAPI_Interface { - public: - /// Constructor +public: + /// Constructor GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(); - + /// Constructor by the already stored builder in the interface GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder); /// Returns a shape built by the shape construction algorithm GEOMALGOAPI_EXPORT const std::shared_ptr shape() const; - /// Returns the list of shapes generated from the shape + /// Returns the list of shapes generated from the shape \a theShape GEOMALGOAPI_EXPORT virtual void generated( const std::shared_ptr theShape, ListOfShape& theHistory); - /// Returns the list of shapes modified from the shape + /// Returns the list of shapes modified from the shape \a theShape GEOMALGOAPI_EXPORT virtual void modified( const std::shared_ptr theShape, ListOfShape& theHistory); /// Returns whether the shape is an edge GEOMALGOAPI_EXPORT virtual bool isDeleted(const std::shared_ptr theShape); - + /// Initializes the algorithm by the builder stored in the interface GEOMALGOAPI_EXPORT void init(void* theMkShape); protected: + /// The resulting shape std::shared_ptr myShape; }; diff --git a/src/PartSetPlugin/PartSetPlugin_Plugin.h b/src/PartSetPlugin/PartSetPlugin_Plugin.h index 364ebb48d..59ace5aa8 100644 --- a/src/PartSetPlugin/PartSetPlugin_Plugin.h +++ b/src/PartSetPlugin/PartSetPlugin_Plugin.h @@ -16,6 +16,10 @@ #include +/**\class FeaturesPlugin_Plugin + * \ingroup Plugins + * \brief The main class for management the part set operations as plugin. + */ class PARTSETPLUGIN_EXPORT PartSetPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener { diff --git a/src/SketchPlugin/SketchPlugin_Feature.h b/src/SketchPlugin/SketchPlugin_Feature.h index b69de135b..bf7cb93fa 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.h +++ b/src/SketchPlugin/SketchPlugin_Feature.h @@ -55,6 +55,7 @@ class SketchPlugin_Feature : public ModelAPI_Feature, public GeomAPI_ICustomPrs /// Returns true is sketch element is under the rigid constraint SKETCHPLUGIN_EXPORT virtual bool isFixed() {return false;} + /// Returns true of the feature is created basing on the external shape of not-this-sketch object inline bool isExternal() const { AttributeSelectionPtr aAttr = data()->selection(EXTERNAL_ID()); diff --git a/src/SketchPlugin/SketchPlugin_ResultValidators.h b/src/SketchPlugin/SketchPlugin_ResultValidators.h index d5100d8fc..6e328b175 100644 --- a/src/SketchPlugin/SketchPlugin_ResultValidators.h +++ b/src/SketchPlugin/SketchPlugin_ResultValidators.h @@ -11,21 +11,42 @@ #include #include +/**\class SketchPlugin_ResultPointValidator + * \ingroup Validators + * \brief Validator for the points selection + * + * Allows to select points only. + */ class SketchPlugin_ResultPointValidator : public ModelAPI_ResultValidator { - public: +public: + /// Returns true if theObject is a point SKETCHPLUGIN_EXPORT virtual bool isValid(const ObjectPtr theObject) const; }; +/**\class SketchPlugin_ResultLineValidator + * \ingroup Validators + * \brief Validator for the linear segments selection + * + * Allows to select linear segments only. + */ class SketchPlugin_ResultLineValidator : public ModelAPI_ResultValidator { - public: +public: + /// Returns true if theObject is a line SKETCHPLUGIN_EXPORT virtual bool isValid(const ObjectPtr theObject) const; }; +/**\class SketchPlugin_ResultArcValidator + * \ingroup Validators + * \brief Validator for the circular segments selection + * + * Allows to select circular segments only. + */ class SketchPlugin_ResultArcValidator : public ModelAPI_ResultValidator { public: + /// Returns true if theObject is an arc SKETCHPLUGIN_EXPORT virtual bool isValid(const ObjectPtr theObject) const; }; diff --git a/src/SketchPlugin/SketchPlugin_Sketch.h b/src/SketchPlugin/SketchPlugin_Sketch.h index a65fbb197..14e3082f0 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.h +++ b/src/SketchPlugin/SketchPlugin_Sketch.h @@ -139,14 +139,6 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature//, public GeomAPI_I SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID); protected: - /// Creates a plane and append it to the list - /// \param theX the X normal value - /// \param theY the Y normal value - /// \param theZ the Z normal value - /// \param theShapes the list of result shapes - //void addPlane(double theX, double theY, double theZ, - // std::list >& theShapes) const; - /// Checks whether the plane is set in the sketch. /// \returns the boolean state bool isPlaneSet(); diff --git a/src/SketchPlugin/SketchPlugin_Validators.h b/src/SketchPlugin/SketchPlugin_Validators.h index 2f675c4f4..0e94d7a70 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.h +++ b/src/SketchPlugin/SketchPlugin_Validators.h @@ -10,6 +10,12 @@ #include "SketchPlugin.h" #include +/**\class SketchPlugin_DistanceAttrValidator + * \ingroup Validators + * \brief Validator for the distance input. + * + * It just checks that distance is greater than zero. + */ class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator { public: @@ -27,7 +33,9 @@ class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator const AttributePtr& theAttribute) const { return true; }; }; -/** +/**\class SketchPlugin_DifferentObjectsValidator + * \ingroup Validators + * * Check that there is no same object was already selected in the feature. * For an example: to avoid perpendicularity on line and the same line. */ diff --git a/src/SketchSolver/SketchSolver_Constraint.h b/src/SketchSolver/SketchSolver_Constraint.h index 4520bf3a5..e194c2571 100644 --- a/src/SketchSolver/SketchSolver_Constraint.h +++ b/src/SketchSolver/SketchSolver_Constraint.h @@ -20,8 +20,10 @@ */ class SketchSolver_Constraint { - public: +public: + /// Default constructor SketchSolver_Constraint(); + /// Creates constraint to manage the given constraint from plugin SketchSolver_Constraint(std::shared_ptr theConstraint); /** \brief Compute constraint type according to SolveSpace identifiers diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp index 6a6fe158e..1b1a621c2 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp @@ -38,11 +38,11 @@ /// Tolerance for value of parameters const double tolerance = 1.e-10; -/* +/** * Collects all sketch solver error' codes * as inline static functions - * TODO: Move this class into a separate file */ + // TODO: Move this class into a separate file class SketchSolver_Error { public: diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.h b/src/SketchSolver/SketchSolver_ConstraintGroup.h index 2a5fe600c..94734f20c 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.h +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.h @@ -62,6 +62,10 @@ class SketchSolver_ConstraintGroup * \return \c true if the constraint added or updated successfully */ bool changeConstraint(std::shared_ptr theConstraint); + /** \brief Adds or updates a rigid constraint in the group + * \param[in] theConstraint constraint to be changed + * \return \c true if the constraint added or updated successfully + */ bool changeRigidConstraint(std::shared_ptr theConstraint); /** \brief Verifies the feature attributes are used in this group @@ -76,6 +80,7 @@ class SketchSolver_ConstraintGroup */ bool isBaseWorkplane(std::shared_ptr theWorkplane) const; + /// Returns the current workplane std::shared_ptr getWorkplane() const { return mySketch; diff --git a/src/SketchSolver/SketchSolver_Solver.h b/src/SketchSolver/SketchSolver_Solver.h index fd2e52132..7079f1598 100644 --- a/src/SketchSolver/SketchSolver_Solver.h +++ b/src/SketchSolver/SketchSolver_Solver.h @@ -27,6 +27,9 @@ typedef unsigned int UINT32; // Unknown entity #define SLVS_E_UNKNOWN 0 +/** + * The main class that performs the high-level operations for connection to the SolveSpace. + */ class SketchSolver_Solver { public: -- 2.30.2