From 4a28151d74257f3a0d07af1b2270b76105e27e62 Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 14 Jun 2016 13:06:12 +0300 Subject: [PATCH] Small formatting and fix of addCircle --- src/SketchAPI/SketchAPI_Sketch.cpp | 4 +-- src/SketchAPI/SketchAPI_Sketch.h | 50 ++++++++++++++---------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index ea8047d6c..c0bdae5e8 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -162,14 +162,14 @@ std::shared_ptr SketchAPI_Sketch::addCircle(const std::shared_ std::shared_ptr SketchAPI_Sketch::addCircle(const ModelHighAPI_Selection & theExternal) { - std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID()); + std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID()); return CirclePtr(new SketchAPI_Circle(aFeature, theExternal)); } std::shared_ptr SketchAPI_Sketch::addCircle(const std::string & theExternalName) { // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary? - std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID()); + std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID()); return CirclePtr(new SketchAPI_Circle(aFeature, theExternalName)); } diff --git a/src/SketchAPI/SketchAPI_Sketch.h b/src/SketchAPI/SketchAPI_Sketch.h index 524c013c4..3dce93862 100644 --- a/src/SketchAPI/SketchAPI_Sketch.h +++ b/src/SketchAPI/SketchAPI_Sketch.h @@ -81,34 +81,32 @@ public: SKETCHAPI_EXPORT std::shared_ptr addLine(const std::string & theExternalName); - // Add circle. - SKETCHAPI_EXPORT - std::shared_ptr addCircle(double theCenterX, - double theCenterY, - double theRadius); - - // Add circle. - SKETCHAPI_EXPORT - std::shared_ptr addCircle(const std::shared_ptr& theCenter, - double theRadius); - - // Add circle. - SKETCHAPI_EXPORT - std::shared_ptr addCircle(double theX1, double theY1, - double theX2, double theY2, - double theX3, double theY3); - - // Add circle. - SKETCHAPI_EXPORT - std::shared_ptr addCircle(const std::shared_ptr& thePoint1, - const std::shared_ptr& thePoint2, - const std::shared_ptr& thePoint3); - - /// Add circle. + /// Add circle + SKETCHAPI_EXPORT + std::shared_ptr addCircle( + double theCenterX, double theCenterY, + double theRadius); + /// Add circle + SKETCHAPI_EXPORT + std::shared_ptr addCircle( + const std::shared_ptr& theCenter, + double theRadius); + /// Add circle + SKETCHAPI_EXPORT + std::shared_ptr addCircle( + double theX1, double theY1, + double theX2, double theY2, + double theX3, double theY3); + /// Add circle + SKETCHAPI_EXPORT + std::shared_ptr addCircle( + const std::shared_ptr& thePoint1, + const std::shared_ptr& thePoint2, + const std::shared_ptr& thePoint3); + /// Add circle SKETCHAPI_EXPORT std::shared_ptr addCircle(const ModelHighAPI_Selection & theExternal); - - /// Add circle. + /// Add circle SKETCHAPI_EXPORT std::shared_ptr addCircle(const std::string & theExternalName); -- 2.39.2