X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Plugin.cpp;h=635583b0c14011a42a5f6d631431eb8442655f2f;hb=3f1a42a51c7de1911c75453ff7134593d7d2c6b1;hp=0d3c66fd57f4b0823b226e1d964a0d81f107eabc;hpb=95593a2d6563211c55dba673c655ecdc6dfe0a4b;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 0d3c66fd5..635583b0c 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -4,8 +4,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -78,6 +80,10 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() new SketchPlugin_MiddlePointAttrValidator); aFactory->registerValidator("SketchPlugin_ArcTangentPoint", new SketchPlugin_ArcTangentPointValidator); + aFactory->registerValidator("SketchPlugin_IntersectionValidator", + new SketchPlugin_IntersectionValidator); + aFactory->registerValidator("SketchPlugin_ProjectionValidator", + new SketchPlugin_ProjectionValidator); // register this plugin ModelAPI_Session::get()->registerPlugin(this); @@ -115,12 +121,16 @@ FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID) return FeaturePtr(new SketchPlugin_Sketch); } else if (theFeatureID == SketchPlugin_Point::ID()) { return FeaturePtr(new SketchPlugin_Point); + } else if (theFeatureID == SketchPlugin_IntersectionPoint::ID()) { + return FeaturePtr(new SketchPlugin_IntersectionPoint); } else if (theFeatureID == SketchPlugin_Line::ID()) { return FeaturePtr(new SketchPlugin_Line); } else if (theFeatureID == SketchPlugin_Circle::ID()) { return FeaturePtr(new SketchPlugin_Circle); } else if (theFeatureID == SketchPlugin_Arc::ID()) { return FeaturePtr(new SketchPlugin_Arc); + } else if (theFeatureID == SketchPlugin_Projection::ID()) { + return FeaturePtr(new SketchPlugin_Projection); } else if (theFeatureID == SketchPlugin_ConstraintCoincidence::ID()) { return FeaturePtr(new SketchPlugin_ConstraintCoincidence); } else if (theFeatureID == SketchPlugin_ConstraintCollinear::ID()) { @@ -194,9 +204,11 @@ std::shared_ptr SketchPlugin_Plugin !(aNormal->x() == 0 && aNormal->y() == 0 && aNormal->z() == 0); aMsg->setState(SketchPlugin_Point::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_IntersectionPoint::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_Line::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_Circle::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_Arc::ID(), aHasSketchPlane); + aMsg->setState(SketchPlugin_Projection::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintCoincidence::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintCollinear::ID(), aHasSketchPlane); aMsg->setState(SketchPlugin_ConstraintDistance::ID(), aHasSketchPlane);