X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_MacroRectangle.cpp;h=1541f84332cc2e06e55d000fbd3d6a71f65c6df4;hb=29ae5ac5706b94b3df50136a545649be524fd2a3;hp=ff1c97321320d37b57f3afb311d3ce6c7249f30c;hpb=0eeaed469a5b7b41148756c3c27c5da6490d1945;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_MacroRectangle.cpp b/src/SketchPlugin/SketchPlugin_MacroRectangle.cpp index ff1c97321..1541f8433 100644 --- a/src/SketchPlugin/SketchPlugin_MacroRectangle.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroRectangle.cpp @@ -47,8 +47,7 @@ const double tolerance = 1e-7; SketchPlugin_MacroRectangle::SketchPlugin_MacroRectangle() : SketchPlugin_SketchEntity(), myHasCenterPoint(false) -{ -} +{} void SketchPlugin_MacroRectangle::initAttributes() { @@ -139,32 +138,41 @@ void SketchPlugin_MacroRectangle::execute() if(myHasCenterPoint){ std::dynamic_pointer_cast( - myRectangleFeature->attribute(SketchPlugin_Rectangle::CENTER_ID()))->setValue(myCenterPoint->x(), - myCenterPoint->y()); + myRectangleFeature->attribute( + SketchPlugin_Rectangle::CENTER_ID()))->setValue(myCenterPoint->x(), + myCenterPoint->y()); } std::dynamic_pointer_cast( - myRectangleFeature->attribute(SketchPlugin_Rectangle::START_ID()))->setValue(myStartPoint->x(), - myStartPoint->y()); + myRectangleFeature->attribute( + SketchPlugin_Rectangle::START_ID()))->setValue(myStartPoint->x(), + myStartPoint->y()); std::dynamic_pointer_cast( - myRectangleFeature->attribute(SketchPlugin_Rectangle::END_ID()))->setValue(myEndPoint->x(), - myEndPoint->y()); + myRectangleFeature->attribute( + SketchPlugin_Rectangle::END_ID()))->setValue(myEndPoint->x(), + myEndPoint->y()); myRectangleFeature->boolean(SketchPlugin_Rectangle::AUXILIARY_ID()) ->setValue(boolean(AUXILIARY_ID())->value()); myRectangleFeature->execute(); /// create coincidences with rectangle start/center and end points - AttributeRefListPtr aLinesList = myRectangleFeature->reflist(SketchPlugin_Rectangle::LINES_LIST_ID()); - FeaturePtr aRectangleStartLineFeature = std::dynamic_pointer_cast(aLinesList->object(0)); - FeaturePtr aRectangleEndLineFeature = std::dynamic_pointer_cast(aLinesList->object(2)); + AttributeRefListPtr aLinesList = + myRectangleFeature->reflist(SketchPlugin_Rectangle::LINES_LIST_ID()); + FeaturePtr aRectangleStartLineFeature = + std::dynamic_pointer_cast(aLinesList->object(0)); + FeaturePtr aRectangleEndLineFeature = + std::dynamic_pointer_cast(aLinesList->object(2)); std::shared_ptr aRectanglePointEndAttr = - std::dynamic_pointer_cast(aRectangleEndLineFeature->attribute(SketchPlugin_Line::END_ID())); + std::dynamic_pointer_cast( + aRectangleEndLineFeature->attribute(SketchPlugin_Line::END_ID())); std::shared_ptr aRectanglePointStartAttr = - std::dynamic_pointer_cast(aRectangleStartLineFeature->attribute(SketchPlugin_Line::END_ID())); + std::dynamic_pointer_cast( + aRectangleStartLineFeature->attribute(SketchPlugin_Line::END_ID())); if(myHasCenterPoint){ - FeaturePtr aCenterPointFeature = std::dynamic_pointer_cast(myRectangleFeature->refattr(CENTER_REF_ID())->object()); + FeaturePtr aCenterPointFeature = std::dynamic_pointer_cast( + myRectangleFeature->refattr(CENTER_REF_ID())->object()); SketchPlugin_Tools::createCoincidenceOrTangency( this, CENTER_REF_ID(), AttributePtr(), aCenterPointFeature, false); SketchPlugin_Tools::createCoincidenceOrTangency(