X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Factory.h;h=485c5a6fe0457622b2b2e7a30531fa1fbef1122d;hb=8476d5e088f7b1b5a414fa5e33ce99d6131929eb;hp=6e61853e93a30171cd83449902d387853e2d6697;hpb=0f0ed262e58309bcd9e5a1cb8415523821051d8d;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Factory.h b/src/SketcherPrs/SketcherPrs_Factory.h index 6e61853e9..485c5a6fe 100644 --- a/src/SketcherPrs/SketcherPrs_Factory.h +++ b/src/SketcherPrs/SketcherPrs_Factory.h @@ -9,10 +9,15 @@ #include "SketcherPrs.h" +#include + #include #include -class SketchPlugin_Constraint; +#define GET_CONSTRAINT_PRS(NAME) \ + static AISObjectPtr NAME(ModelAPI_Feature* theConstraint, \ + const std::shared_ptr& thePlane, \ + AISObjectPtr thePrevious); /** * Class which creates constraints presentations @@ -23,26 +28,72 @@ public: /// Creates coincedent constraint presentation /// \param theConstraint the constraint /// \param thePlane the current sketch plane - static AISObjectPtr coincidentConstraint(SketchPlugin_Constraint* theConstraint, - const std::shared_ptr& thePlane); + GET_CONSTRAINT_PRS(coincidentConstraint) - /// Creates coincedent parallel presentation + /// Creates parallel constraint presentation /// \param theConstraint the constraint /// \param thePlane the current sketch plane - static AISObjectPtr parallelConstraint(SketchPlugin_Constraint* theConstraint, - const std::shared_ptr& thePlane); + GET_CONSTRAINT_PRS(parallelConstraint) /// Creates coincedent perpendicular presentation /// \param theConstraint the constraint /// \param thePlane the current sketch plane - static AISObjectPtr perpendicularConstraint(SketchPlugin_Constraint* theConstraint, - const std::shared_ptr& thePlane); + GET_CONSTRAINT_PRS(perpendicularConstraint) - /// Creates coincedent perpendicular presentation + /// Creates rigid constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(rigidConstraint) + + /// Creates horizontal constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(horisontalConstraint) + + /// Creates vertical constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(verticalConstraint) + + /// Creates equal constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(equalConstraint) + + /// Creates tangent constraiont presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(tangentConstraint) + + /// Creates radius dimension presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(radiusConstraint) + + /// Creates length dimension presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(lengthDimensionConstraint) + + /// Creates mirror constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(mirrorConstraint) + + /// Creates translate constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(translateConstraint) + + /// Creates rotate constraint presentation + /// \param theConstraint the constraint + /// \param thePlane the current sketch plane + GET_CONSTRAINT_PRS(rotateConstraint) + + /// Creates angle constraint presentation /// \param theConstraint the constraint /// \param thePlane the current sketch plane - static AISObjectPtr rigidConstraint(SketchPlugin_Constraint* theConstraint, - const std::shared_ptr& thePlane); + GET_CONSTRAINT_PRS(angleConstraint) }; #endif