From: vsv Date: Thu, 26 Mar 2015 08:42:37 +0000 (+0300) Subject: Create coincidence constraint command X-Git-Tag: V_1.1.0~81 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=273a9fd8c80a615dfe3b6ccdc6b93301c449d642;p=modules%2Fshaper.git Create coincidence constraint command --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index a6ae7a8a5..2747c4004 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -586,6 +587,7 @@ QStringList PartSet_SketcherMgr::sketchOperationIdList() aIds << SketchPlugin_ConstraintVertical::ID().c_str(); aIds << SketchPlugin_ConstraintEqual::ID().c_str(); aIds << SketchPlugin_ConstraintTangent::ID().c_str(); + aIds << SketchPlugin_ConstraintCoincidence::ID().c_str(); } return aIds; } diff --git a/src/PartSet/PartSet_icons.qrc b/src/PartSet/PartSet_icons.qrc index 8c546fdb8..62cefad48 100644 --- a/src/PartSet/PartSet_icons.qrc +++ b/src/PartSet/PartSet_icons.qrc @@ -35,5 +35,6 @@ icons/equal.png icons/tangent.png icons/fillet.png + icons/coincedence.png diff --git a/src/PartSet/icons/coincedence.png b/src/PartSet/icons/coincedence.png new file mode 100644 index 000000000..9e0670d07 Binary files /dev/null and b/src/PartSet/icons/coincedence.png differ diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index f1bc36d9b..0f62a2932 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -5,7 +5,7 @@ - + + + + - + + + + + + + + + + @@ -146,6 +154,7 @@ + + + + + + diff --git a/src/SketcherPrs/SketcherPrs_Tools.cpp b/src/SketcherPrs/SketcherPrs_Tools.cpp index 9f845f57f..2c575e1a3 100644 --- a/src/SketcherPrs/SketcherPrs_Tools.cpp +++ b/src/SketcherPrs/SketcherPrs_Tools.cpp @@ -62,7 +62,9 @@ std::shared_ptr getPoint(SketchPlugin_Constraint* theFeature, else if (anAttr->attr()) { aPointAttr = std::dynamic_pointer_cast(anAttr->attr()); } - return aPointAttr->pnt(); + if (aPointAttr.get() != NULL) + return aPointAttr->pnt(); + return std::shared_ptr(); }