X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_MacroRectangle.cpp;h=a619aefd25244cc9caba71544c5a28188df8d0bb;hb=3c9bfdce3bd7cef0b5e5a23277acd064fb760af8;hp=d2614f452ef1ec5fde223e6c8cd689cd41b121bc;hpb=58d96e6e1df410d587bcfa91152fd8da6d9da2c0;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_MacroRectangle.cpp b/src/SketchAPI/SketchAPI_MacroRectangle.cpp index d2614f452..a619aefd2 100644 --- a/src/SketchAPI/SketchAPI_MacroRectangle.cpp +++ b/src/SketchAPI/SketchAPI_MacroRectangle.cpp @@ -39,12 +39,12 @@ SketchAPI_MacroRectangle::SketchAPI_MacroRectangle(const std::shared_ptr& theFeature, const std::shared_ptr& theStartPoint, - const std::shared_ptr& theSecondPoint, bool isSecondPointCenter): + const std::shared_ptr& theSecondPoint, bool isFirstPointCenter): SketchAPI_SketchEntity(theFeature) { if(initialize()) { - if(isSecondPointCenter) - setByStartAndCenterPoints(theStartPoint, theSecondPoint); + if(isFirstPointCenter) + setByCenterAndEndPoints(theStartPoint, theSecondPoint); else setByStartAndEndPoints(theStartPoint, theSecondPoint); } @@ -91,20 +91,18 @@ void SketchAPI_MacroRectangle::setByStartAndEndPoints(const std::shared_ptr& theStartPoint, - const std::shared_ptr& theCenterPoint){ - fillAttribute(SketchPlugin_MacroRectangle::START_END_POINT_TYPE_ID(), rectangleType()); - fillAttribute(theStartPoint, startPoint2()); +void SketchAPI_MacroRectangle::setByCenterAndEndPoints(const std::shared_ptr& theCenterPoint, const std::shared_ptr& theEndPoint){ + fillAttribute(SketchPlugin_MacroRectangle::CENTER_END_POINT_TYPE_ID(), rectangleType()); + fillAttribute(theEndPoint, endPoint2()); fillAttribute(theCenterPoint, centerPoint()); execute();