From 1f230cd2236f4f14061ebe3224674d2b72bff678 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 16 Sep 2019 11:51:06 +0300 Subject: [PATCH] Avoid naming of auxiliary points of ellipse. --- src/SketchPlugin/SketchPlugin_MacroEllipse.cpp | 16 +++++++--------- src/SketchPlugin/SketchPlugin_MacroEllipse.h | 3 +-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_MacroEllipse.cpp b/src/SketchPlugin/SketchPlugin_MacroEllipse.cpp index 6d5dd5741..2effeb197 100644 --- a/src/SketchPlugin/SketchPlugin_MacroEllipse.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroEllipse.cpp @@ -289,12 +289,12 @@ FeaturePtr SketchPlugin_MacroEllipse::createEllipseFeature() aEllipseFeature->execute(); // create auxiliary points - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::FIRST_FOCUS_ID()), "FirstFocus"); - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::SECOND_FOCUS_ID()), "SecondFocus"); - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_START_ID()), "MajorAxisNegative"); - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_END_ID()), "MajorAxisPositive"); - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MINOR_AXIS_START_ID()), "MinorAxisNegative"); - createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MINOR_AXIS_END_ID()), "MinorAxisPositive"); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::FIRST_FOCUS_ID())); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::SECOND_FOCUS_ID())); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_START_ID())); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_END_ID())); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MINOR_AXIS_START_ID())); + createAuxiliaryPoint(aEllipseFeature->attribute(SketchPlugin_Ellipse::MINOR_AXIS_END_ID())); // create auxiliary axes createAuxiliaryAxis(aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_START_ID()), aEllipseFeature->attribute(SketchPlugin_Ellipse::MAJOR_AXIS_END_ID())); @@ -304,11 +304,9 @@ FeaturePtr SketchPlugin_MacroEllipse::createEllipseFeature() return aEllipseFeature; } -void SketchPlugin_MacroEllipse::createAuxiliaryPoint(const AttributePtr& theEllipsePoint, - const std::string& theName) +void SketchPlugin_MacroEllipse::createAuxiliaryPoint(const AttributePtr& theEllipsePoint) { FeaturePtr aPointFeature = sketch()->addFeature(SketchPlugin_Point::ID()); - aPointFeature->data()->setName(theName); aPointFeature->boolean(SketchPlugin_Point::AUXILIARY_ID())->setValue(true); AttributePoint2DPtr anElPoint = std::dynamic_pointer_cast(theEllipsePoint); diff --git a/src/SketchPlugin/SketchPlugin_MacroEllipse.h b/src/SketchPlugin/SketchPlugin_MacroEllipse.h index ac087b055..2b92f7f2a 100644 --- a/src/SketchPlugin/SketchPlugin_MacroEllipse.h +++ b/src/SketchPlugin/SketchPlugin_MacroEllipse.h @@ -162,8 +162,7 @@ private: FeaturePtr createEllipseFeature(); - void createAuxiliaryPoint(const AttributePtr& theEllipsePoint, - const std::string& theName); + void createAuxiliaryPoint(const AttributePtr& theEllipsePoint); void createAuxiliaryAxis(const AttributePtr& theStartPoint, const AttributePtr& theEndPoint); void createInternalConstraint(const AttributePtr& thePoint1, const AttributePtr& thePoint2); -- 2.39.2