From: vsv Date: Mon, 28 Jul 2014 06:30:29 +0000 (+0400) Subject: Create Radius constraint X-Git-Tag: V_0.4.4~141 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10f134593af1643c7cfe2a9c703775bd1edb2556;p=modules%2Fshaper.git Create Radius constraint --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp index 9b412d1c6..11071843f 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp @@ -37,7 +37,7 @@ void SketchPlugin_ConstraintRadius::execute() boost::shared_ptr aRef = boost::dynamic_pointer_cast(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); - FeaturePtr aFeature = boost::dynamic_pointer_cast(aRef->object()); + FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(aRef->object()); if (aFeature) { double aRadius = 0; boost::shared_ptr aData = aFeature->data(); @@ -73,7 +73,7 @@ boost::shared_ptr SketchPlugin_ConstraintRadius::getAISObject boost::dynamic_pointer_cast(aData->attribute(SketchPlugin_Constraint::ENTITY_A())); if (!anAttr) return thePrevious; - FeaturePtr aFeature = boost::dynamic_pointer_cast(anAttr->object()); + FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(anAttr->object()); std::string aKind = aFeature ? aFeature->getKind() : ""; if (aKind != SketchPlugin_Circle::ID() && aKind != SketchPlugin_Arc::ID()) return thePrevious; @@ -130,7 +130,7 @@ void SketchPlugin_ConstraintRadius::move(double theDeltaX, double theDeltaY) boost::shared_ptr aRef = boost::dynamic_pointer_cast(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); - FeaturePtr aFeature = boost::dynamic_pointer_cast(aRef->object()); + FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(aRef->object()); if (!aFeature) return; std::string aCenterAttrName;