X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Plugin.cpp;h=59d20c38d5fa4a6724eb26f345179a4ccfe12707;hb=refs%2Ftags%2FV_1.2.1;hp=fd9b04f8ac6331ea67e0bf9f130ae1f6c81d575a;hpb=301fde7eeae07fdae18ebd02f93e09d1a182e38d;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index fd9b04f8a..59d20c38d 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -9,17 +9,20 @@ #include #include #include +#include #include #include +#include #include #include #include #include #include #include +#include +#include #include -#include -#include +#include #include #include @@ -50,17 +53,24 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); aFactory->registerValidator("SketchPlugin_DistanceAttr", new SketchPlugin_DistanceAttrValidator); - //aFactory->registerValidator("SketchPlugin_DifferentObjects", - // new SketchPlugin_DifferentObjectsValidator); - aFactory->registerValidator("SketchPlugin_ResultPoint", new SketchPlugin_ResultPointValidator); - aFactory->registerValidator("SketchPlugin_ResultLine", new SketchPlugin_ResultLineValidator); - aFactory->registerValidator("SketchPlugin_ResultArc", new SketchPlugin_ResultArcValidator); - aFactory->registerValidator("SketchPlugin_ShapeValidator", - new SketchPlugin_ShapeValidator); + aFactory->registerValidator("SketchPlugin_ExternalValidator", + new SketchPlugin_ExternalValidator); + aFactory->registerValidator("SketchPlugin_TangentAttr", + new SketchPlugin_TangentAttrValidator); + aFactory->registerValidator("SketchPlugin_NotFixed", + new SketchPlugin_NotFixedValidator); + aFactory->registerValidator("SketchPlugin_EqualAttr", + new SketchPlugin_EqualAttrValidator); + aFactory->registerValidator("SketchPlugin_MirrorAttr", + new SketchPlugin_MirrorAttrValidator); + aFactory->registerValidator("SketchPlugin_CoincidenceAttr", + new SketchPlugin_CoincidenceAttrValidator); + aFactory->registerValidator("SketchPlugin_CopyValidator", + new SketchPlugin_CopyValidator); // register this plugin ModelAPI_Session::get()->registerPlugin(this); - + Config_PropManager::registerProp("Visualization", "sketch_entity_color", "Sketch enity color", Config_Prop::Color, SKETCH_ENTITY_COLOR); @@ -121,6 +131,14 @@ FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID) return FeaturePtr(new SketchPlugin_ConstraintEqual); } else if (theFeatureID == SketchPlugin_ConstraintTangent::ID()) { return FeaturePtr(new SketchPlugin_ConstraintTangent); + } else if (theFeatureID == SketchPlugin_ConstraintMirror::ID()) { + return FeaturePtr(new SketchPlugin_ConstraintMirror); + } else if (theFeatureID == SketchPlugin_ConstraintFillet::ID()) { + return FeaturePtr(new SketchPlugin_ConstraintFillet); + } else if (theFeatureID == SketchPlugin_MultiTranslation::ID()) { + return FeaturePtr(new SketchPlugin_MultiTranslation); + } else if (theFeatureID == SketchPlugin_MultiRotation::ID()) { + return FeaturePtr(new SketchPlugin_MultiRotation); } // feature of such kind is not found return FeaturePtr(); @@ -169,6 +187,10 @@ std::shared_ptr SketchPlugin_Plugin aMsg->setState(SketchPlugin_ConstraintVertical::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintEqual::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintTangent::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_ConstraintMirror::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_ConstraintFillet::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_MultiRotation::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_MultiTranslation::ID(), aHasSketchPlane); } } return aMsg;