]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ConstructionAPI/ConstructionAPI_Axis.h
Salome HOME
Issue #1650: Added CPP High API for feature Axis;
[modules/shaper.git] / src / ConstructionAPI / ConstructionAPI_Axis.h
index ed8f4bc620d006dd457ddce5f565ab0430408a0e..0b62587a637ac2a0d3e85d80cd188877d2ab6ee9 100644 (file)
 #ifndef SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
 #define SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_
 
-//--------------------------------------------------------------------------------------
 #include "ConstructionAPI.h"
 
 #include <ConstructionPlugin_Axis.h>
 
 #include <ModelHighAPI_Interface.h>
 #include <ModelHighAPI_Macro.h>
-//--------------------------------------------------------------------------------------
+
 class ModelHighAPI_Double;
 class ModelHighAPI_Selection;
-//--------------------------------------------------------------------------------------
-/**\class ConstructionAPI_Axis
- * \ingroup CPPHighAPI
- * \brief Interface for Axis feature
- */
-class ConstructionAPI_Axis : public ModelHighAPI_Interface
+
+/// \class ConstructionAPI_Axis
+/// \ingroup CPPHighAPI
+/// \brief Interface for Axis feature
+class ConstructionAPI_Axis: public ModelHighAPI_Interface
 {
 public:
   /// Constructor without values
   CONSTRUCTIONAPI_EXPORT
-  explicit ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature);
+  explicit ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
   /// Constructor with values
   CONSTRUCTIONAPI_EXPORT
-  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
-                       const ModelHighAPI_Selection & thePoint1,
-                       const ModelHighAPI_Selection & thePoint2);
+  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const ModelHighAPI_Selection& theObject1,
+                       const ModelHighAPI_Selection& theObject2);
+
   /// Constructor with values
   CONSTRUCTIONAPI_EXPORT
-  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
-                       const ModelHighAPI_Selection & theCylindricalFace);
+  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const ModelHighAPI_Selection& theObject);
+
   /// Constructor with values
   CONSTRUCTIONAPI_EXPORT
-  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
-                       const ModelHighAPI_Selection & thePoint,
-                       const ModelHighAPI_Double & theX,
-                       const ModelHighAPI_Double & theY,
-                       const ModelHighAPI_Double & theZ);
+  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const ModelHighAPI_Selection& thePoint,
+                       const ModelHighAPI_Double& theX,
+                       const ModelHighAPI_Double& theY,
+                       const ModelHighAPI_Double& theZ);
+
   /// Constructor with values
   CONSTRUCTIONAPI_EXPORT
-  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature> & theFeature,
-                       const ModelHighAPI_Double & theDX,
-                       const ModelHighAPI_Double & theDY,
-                       const ModelHighAPI_Double & theDZ);
+  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const ModelHighAPI_Double& theDX,
+                       const ModelHighAPI_Double& theDY,
+                       const ModelHighAPI_Double& theDZ);
+
+  /// Constructor with values
+  CONSTRUCTIONAPI_EXPORT
+  ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const ModelHighAPI_Selection& thePlane1,
+                       const ModelHighAPI_Double& theOffset1,
+                       const bool theReverseOffset1,
+                       const ModelHighAPI_Selection& thePlane2,
+                       const ModelHighAPI_Double& theOffset2,
+                       const bool theReverseOffset2);
+
   /// Destructor
   CONSTRUCTIONAPI_EXPORT
   virtual ~ConstructionAPI_Axis();
 
-  INTERFACE_10(ConstructionPlugin_Axis::ID(),
-              creationMethod, ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString, /** Creation method */,
-              firstPoint, ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection, /** First point */,
-              secondPoint, ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection, /** Second point */,
-              cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection, /** Cylindrical face */,
-              xDirection, ConstructionPlugin_Axis::X_DIRECTION(), ModelAPI_AttributeDouble, /** X direction */,
-              yDirection, ConstructionPlugin_Axis::Y_DIRECTION(), ModelAPI_AttributeDouble, /** Y direction */,
-              zDirection, ConstructionPlugin_Axis::Z_DIRECTION(), ModelAPI_AttributeDouble, /** Z direction */,
-              xDimension, ConstructionPlugin_Axis::DX(), ModelAPI_AttributeDouble, /** X dimension */,
-              yDimension, ConstructionPlugin_Axis::DY(), ModelAPI_AttributeDouble, /** Y dimension */,
-              zDimension, ConstructionPlugin_Axis::DZ(), ModelAPI_AttributeDouble, /** Z dimension */
-  )
+  INTERFACE_21(ConstructionPlugin_Axis::ID(),
+               creationMethod, ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString, /** Creation method */,
+               firstPoint, ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection, /** First point */,
+               secondPoint, ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection, /** Second point */,
+               cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection, /** Cylindrical face */,
+               xDirection, ConstructionPlugin_Axis::X_DIRECTION(), ModelAPI_AttributeDouble, /** X direction */,
+               yDirection, ConstructionPlugin_Axis::Y_DIRECTION(), ModelAPI_AttributeDouble, /** Y direction */,
+               zDirection, ConstructionPlugin_Axis::Z_DIRECTION(), ModelAPI_AttributeDouble, /** Z direction */,
+               xDimension, ConstructionPlugin_Axis::DX(), ModelAPI_AttributeDouble, /** X dimension */,
+               yDimension, ConstructionPlugin_Axis::DY(), ModelAPI_AttributeDouble, /** Y dimension */,
+               zDimension, ConstructionPlugin_Axis::DZ(), ModelAPI_AttributeDouble, /** Z dimension */,
+               line, ConstructionPlugin_Axis::LINE(), ModelAPI_AttributeSelection, /** Line */,
+               plane, ConstructionPlugin_Axis::PLANE(), ModelAPI_AttributeSelection, /** Plane */,
+               point, ConstructionPlugin_Axis::POINT(), ModelAPI_AttributeSelection, /** Point */,
+               plane1, ConstructionPlugin_Axis::PLANE1(), ModelAPI_AttributeSelection, /** Plane 1 */,
+               useOffset1, ConstructionPlugin_Axis::USE_OFFSET1(), ModelAPI_AttributeString, /** Use offset 1 */,
+               offset1, ConstructionPlugin_Axis::OFFSET1(), ModelAPI_AttributeDouble, /** Offset 1 */,
+               reverseOffset1, ConstructionPlugin_Axis::REVERSE_OFFSET1(), ModelAPI_AttributeBoolean, /** Reverse offset 1 */,
+               plane2, ConstructionPlugin_Axis::PLANE2(), ModelAPI_AttributeSelection, /** Plane 2 */,
+               useOffset2, ConstructionPlugin_Axis::USE_OFFSET2(), ModelAPI_AttributeString, /** Use offset 2 */,
+               offset2, ConstructionPlugin_Axis::OFFSET2(), ModelAPI_AttributeDouble, /** Offset 2 */,
+               reverseOffset2, ConstructionPlugin_Axis::REVERSE_OFFSET2(), ModelAPI_AttributeBoolean, /** Reverse offset 2 */)
 
   /// Set points
   CONSTRUCTIONAPI_EXPORT
-  void setPoints(const ModelHighAPI_Selection & thePoint1,
-                 const ModelHighAPI_Selection & thePoint2);
+  void setByPoints(const ModelHighAPI_Selection& thePoint1,
+                   const ModelHighAPI_Selection& thePoint2);
 
   /// Set cylindrical face
   CONSTRUCTIONAPI_EXPORT
-  void setCylindricalFace(const ModelHighAPI_Selection & theCylindricalFace);
+  void setByCylindricalFace(const ModelHighAPI_Selection& theCylindricalFace);
 
   /// Set direction
   CONSTRUCTIONAPI_EXPORT
-  void setPointAndDirection(const ModelHighAPI_Selection & thePoint,
-                            const ModelHighAPI_Double & theX,
-                            const ModelHighAPI_Double & theY,
-                            const ModelHighAPI_Double & theZ);
-  
+  void setByPointAndDirection(const ModelHighAPI_Selection& thePoint,
+                              const ModelHighAPI_Double& theX,
+                              const ModelHighAPI_Double& theY,
+                              const ModelHighAPI_Double& theZ);
+
   /// Set dimensions
   CONSTRUCTIONAPI_EXPORT
-  void setDimensions(const ModelHighAPI_Double & theDX,
-                     const ModelHighAPI_Double & theDY,
-                     const ModelHighAPI_Double & theDZ);
+  void setByDimensions(const ModelHighAPI_Double& theDX,
+                       const ModelHighAPI_Double& theDY,
+                       const ModelHighAPI_Double& theDZ);
+
+  /// Set by line
+  CONSTRUCTIONAPI_EXPORT
+  void setByLine(const ModelHighAPI_Selection& theCylindricalFace);
+
+  /// Set by plane and point
+  CONSTRUCTIONAPI_EXPORT
+  void setByPlaneAndPoint(const ModelHighAPI_Selection& thePlane,
+                          const ModelHighAPI_Selection& thePoint);
+
+  /// Set by two planes
+  CONSTRUCTIONAPI_EXPORT
+  void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
+                      const ModelHighAPI_Selection& thePlane2);
+
+  /// Set by two planes
+  CONSTRUCTIONAPI_EXPORT
+  void setByTwoPlanes(const ModelHighAPI_Selection& thePlane1,
+                      const ModelHighAPI_Double& theOffset1,
+                      const bool theReverseOffset1,
+                      const ModelHighAPI_Selection& thePlane2,
+                      const ModelHighAPI_Double& theOffset2,
+                      const bool theReverseOffset2);
 };
 
-//! Pointer on Axis object
+/// Pointer on Axis object
 typedef std::shared_ptr<ConstructionAPI_Axis> AxisPtr;
 
-/**\ingroup CPPHighAPI
- * \brief Create Axis feature
- */
+/// \ingroup CPPHighAPI
+/// \brief Create Axis feature
 CONSTRUCTIONAPI_EXPORT
-AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
-                const ModelHighAPI_Selection & thePoint1,
-                const ModelHighAPI_Selection & thePoint2);
+AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
+                const ModelHighAPI_Selection& theObject1,
+                const ModelHighAPI_Selection& theObject2);
 
-/**\ingroup CPPHighAPI
- * \brief Create Axis feature
- */
+/// \ingroup CPPHighAPI
+/// \brief Create Axis feature
 CONSTRUCTIONAPI_EXPORT
-AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
-                const ModelHighAPI_Selection & theCylindricalFace);
+AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
+                const ModelHighAPI_Selection& theObject);
 
-/**\ingroup CPPHighAPI
- * \brief Create Axis feature
- */
+/// \ingroup CPPHighAPI
+/// \brief Create Axis feature
 CONSTRUCTIONAPI_EXPORT
-AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
-                const ModelHighAPI_Selection & thePoint,
-                const ModelHighAPI_Double & theX,
-                const ModelHighAPI_Double & theY,
-                const ModelHighAPI_Double & theZ);
-
-/**\ingroup CPPHighAPI
- * \brief Create Axis feature
- */
+AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
+                const ModelHighAPI_Selection& thePoint,
+                const ModelHighAPI_Double& theX,
+                const ModelHighAPI_Double& theY,
+                const ModelHighAPI_Double& theZ);
+
+/// \ingroup CPPHighAPI
+/// \brief Create Axis feature
+CONSTRUCTIONAPI_EXPORT
+AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
+                const ModelHighAPI_Double& theDX,
+                const ModelHighAPI_Double& theDY,
+                const ModelHighAPI_Double& theDZ);
+
+/// \ingroup CPPHighAPI
+/// \brief Create Axis feature
 CONSTRUCTIONAPI_EXPORT
-AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document> & thePart,
-                const ModelHighAPI_Double & theDX,
-                const ModelHighAPI_Double & theDY,
-                const ModelHighAPI_Double & theDZ);
+AxisPtr addAxis(const std::shared_ptr<ModelAPI_Document>& thePart,
+                const ModelHighAPI_Selection& thePlane1,
+                const ModelHighAPI_Double& theOffset1,
+                const bool theReverseOffset1,
+                const ModelHighAPI_Selection& thePlane2,
+                const ModelHighAPI_Double& theOffset2,
+                const bool theReverseOffset2);
 
-//--------------------------------------------------------------------------------------
-//--------------------------------------------------------------------------------------
 #endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_AXIS_H_ */