X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Plugin.cpp;h=cfa5e8a095e35f92ed3c07b14d8d450579e931b6;hb=7b4a6a2a335d41a647e0f6a6becb7c23df042be1;hp=7742fa5c10c94fd84a6fbbc853cbf94d2a7b1a22;hpb=f81fd8333b11902d0794a8f83b1d880d5636c153;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 7742fa5c1..cfa5e8a09 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -67,11 +68,13 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() new SketchPlugin_CoincidenceAttrValidator); aFactory->registerValidator("SketchPlugin_CopyValidator", new SketchPlugin_CopyValidator); + aFactory->registerValidator("SketchPlugin_SolverErrorValidator", + new SketchPlugin_SolverErrorValidator); // register this plugin ModelAPI_Session::get()->registerPlugin(this); - Config_PropManager::registerProp("Visualization", "sketch_entity_color", "Sketch enity color", + Config_PropManager::registerProp("Visualization", "sketch_entity_color", "Sketch entity color", Config_Prop::Color, SKETCH_ENTITY_COLOR); Config_PropManager::registerProp("Visualization", "sketch_external_color", "Sketch external entity color", @@ -136,6 +139,8 @@ FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID) return FeaturePtr(new SketchPlugin_MultiTranslation); } else if (theFeatureID == SketchPlugin_MultiRotation::ID()) { return FeaturePtr(new SketchPlugin_MultiRotation); + } else if (theFeatureID == SketchPlugin_ConstraintAngle::ID()) { + return FeaturePtr(new SketchPlugin_ConstraintAngle); } // feature of such kind is not found return FeaturePtr(); @@ -156,8 +161,8 @@ std::shared_ptr SketchPlugin_Plugin ::getFeaturesState(const std::shared_ptr& theFeature) const { const Events_ID kResponseEvent = Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE); - std::shared_ptr aMsg = - std::make_shared(kResponseEvent, this); + std::shared_ptr aMsg( + new ModelAPI_FeatureStateMessage(kResponseEvent, this)); bool aHasSketchPlane = false; std::shared_ptr aSketchFeature = @@ -186,6 +191,7 @@ std::shared_ptr SketchPlugin_Plugin aMsg->setState(SketchPlugin_ConstraintTangent::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintMirror::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintFillet::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_ConstraintAngle::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_MultiRotation::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_MultiTranslation::ID(), aHasSketchPlane); }