From: asozinov Date: Thu, 2 Nov 2023 10:21:07 +0000 (+0000) Subject: fast fix for creating circle point X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a82a03b81907e29b2b256085cf4050d53a63f33;p=modules%2Fshaper.git fast fix for creating circle point --- diff --git a/src/SketchAPI/SketchAPI_Circle.cpp b/src/SketchAPI/SketchAPI_Circle.cpp index 95d48f397..6a9316086 100644 --- a/src/SketchAPI/SketchAPI_Circle.cpp +++ b/src/SketchAPI/SketchAPI_Circle.cpp @@ -133,19 +133,10 @@ void SketchAPI_Circle::setByCenterAndRadius(double theCenterX, double theCenterY fillAttribute(theRadius, myradius); fillAttribute(theAngle, myangle); - bool isNeedPoint = - feature()->integer(SketchPlugin_Circle::VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0; - if (isNeedPoint) - { - fillAttribute(theAngle, angle()); + fillAttribute(theAngle, angle()); - execute(); - createPoint(); - } - else - { - execute(); - } + execute(); + createPoint(); } //================================================================================================== @@ -154,21 +145,10 @@ void SketchAPI_Circle::setByCenterAndRadius(const std::shared_ptr { fillAttribute(theCenter, mycenter); fillAttribute(theRadius, myradius); + fillAttribute(theAngle, angle()); - bool isNeedPoint = - feature()->integer(SketchPlugin_Circle::VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0; - - if (isNeedPoint) - { - fillAttribute(theAngle, angle()); - - execute(); - createPoint(); - } - else - { - execute(); - } + execute(); + createPoint(); } //================================================================================================== @@ -247,26 +227,16 @@ void SketchAPI_Circle::dump(ModelHighAPI_Dumper& theDumper) const const std::string& aSketchName = theDumper.parentName(aBase); AttributeSelectionPtr anExternal = aBase->selection(SketchPlugin_SketchEntity::EXTERNAL_ID()); - std::string aComName = aBase->integer(SketchPlugin_Circle::VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0 ? - "addCircleWithPoint" : "addCircle"; - if (anExternal->context()) { // circle is external - theDumper << aBase << " = " << aSketchName << "." << aComName << "(" << anExternal << ")" << std::endl; + theDumper << aBase << " = " << aSketchName << ".addCircleWithPoint(" << anExternal << ")" << std::endl; } else {// circle given by center and radius - theDumper << aBase << " = " << aSketchName << "." << aComName << "(" << center() << ", " << radius(); - if (aBase->integer(SketchPlugin_Circle::VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - theDumper << ", " << angle() << ")" << std::endl; - std::shared_ptr aPoint = createdPoint(); - if (aPoint) - theDumper << aPoint->feature() << " = " << theDumper.name(aBase) << ".createdPoint()" << std::endl; - } - else - { - theDumper << ")" << std::endl; - } + theDumper << aBase << " = " << aSketchName << ".addCircleWithPoint(" << center() << ", " << radius(); + theDumper << ", " << angle() << ")" << std::endl; + std::shared_ptr aPoint = createdPoint(); + if (aPoint) + theDumper << aPoint->feature() << " = " << theDumper.name(aBase) << ".createdPoint()" << std::endl; } // dump "auxiliary" flag if necessary SketchAPI_SketchEntity::dump(theDumper); diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index 3c30c146a..bc679078e 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -598,7 +598,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle(double theCenterX, { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_Circle::VERSION_ID())); return CirclePtr(new SketchAPI_Circle(aFeature, theCenterX, theCenterY, theRadius, 0)); } @@ -609,7 +608,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle( { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_Circle::VERSION_ID())); return CirclePtr(new SketchAPI_Circle(aFeature, theCenter, theRadius, 0)); } @@ -621,7 +619,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle(double theCen { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_MacroCircle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_MacroCircle::VERSION_ID())); return MacroCirclePtr(new SketchAPI_MacroCircle(aFeature, theCenterX, theCenterY, thePassedX, thePassedY, 0)); } @@ -633,7 +630,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle( { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_MacroCircle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_MacroCircle::VERSION_ID())); return MacroCirclePtr(new SketchAPI_MacroCircle(aFeature, theCenterPoint, thePassedPoint, 0)); } @@ -644,7 +640,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle(double theX1, { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_MacroCircle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_MacroCircle::VERSION_ID())); return MacroCirclePtr(new SketchAPI_MacroCircle(aFeature, theX1, theY1, theX2, theY2, @@ -659,7 +654,6 @@ std::shared_ptr SketchAPI_Sketch::addCircle( { std::shared_ptr aFeature = compositeFeature()->addFeature(SketchPlugin_MacroCircle::ID()); - fillAttribute(SketchPlugin_Circle::THE_VERSION_0, aFeature->integer(SketchPlugin_Circle::VERSION_ID())); return MacroCirclePtr(new SketchAPI_MacroCircle(aFeature, thePoint1, thePoint2, thePoint3, 0)); } diff --git a/src/SketchPlugin/SketchPlugin_Circle.cpp b/src/SketchPlugin/SketchPlugin_Circle.cpp index 86d5721e8..ad29a71fb 100644 --- a/src/SketchPlugin/SketchPlugin_Circle.cpp +++ b/src/SketchPlugin/SketchPlugin_Circle.cpp @@ -63,17 +63,6 @@ void SketchPlugin_Circle::initDerivedClassAttributes() data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(ANGLE_ID(), ModelAPI_AttributeDouble::typeId()); - // While exist addCircle without creating point. - AttributeIntegerPtr aVerAttr = std::dynamic_pointer_cast( - data()->addAttribute(VERSION_ID(), ModelAPI_AttributeInteger::typeId())); - aVerAttr->setIsArgument(false); - ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VERSION_ID()); - if (!aVerAttr->isInitialized()) { - // this is a newly created feature (not read from file), - // so, initialize the latest version - aVerAttr->setValue(SketchPlugin_Circle::THE_VERSION_1); - } - data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ROTATE_ID()); @@ -114,21 +103,15 @@ void SketchPlugin_Circle::execute() aSketch->data()->attribute(SketchPlugin_Sketch::NORM_ID())); std::shared_ptr aNormal(new GeomAPI_Dir(aNDir->x(), aNDir->y(), aNDir->z())); - std::shared_ptr aCircleShape; - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - double aValAn = anAngleAttr->value(); - aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircle(aCenter, aNormal, aRadius, aValAn / 180 * PI); - - // Update corrdinates for point on circle - bool aWasBlocked = data()->blockSendAttributeUpdated(true); - GeomPnt2dPtr aCircleSewPoint = aSketch->to2D(aCircleShape->firstPoint()); - std::dynamic_pointer_cast(data()->attribute(ROTATE_ID())) - ->setValue(aCircleSewPoint->x(), aCircleSewPoint->y()); - data()->blockSendAttributeUpdated(aWasBlocked, false); - } - else - aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircle(aCenter, aNormal, aRadius); + double aValAn = anAngleAttr->value(); + std::shared_ptr aCircleShape = GeomAlgoAPI_EdgeBuilder::lineCircle(aCenter, aNormal, aRadius, aValAn / 180 * PI); + + // Update corrdinates for point on circle + bool aWasBlocked = data()->blockSendAttributeUpdated(true); + GeomPnt2dPtr aCircleSewPoint = aSketch->to2D(aCircleShape->firstPoint()); + std::dynamic_pointer_cast(data()->attribute(ROTATE_ID())) + ->setValue(aCircleSewPoint->x(), aCircleSewPoint->y()); + data()->blockSendAttributeUpdated(aWasBlocked, false); std::shared_ptr aResult = document()->createConstruction(data(), 1); aResult->setShape(aCircleShape); @@ -162,8 +145,7 @@ void SketchPlugin_Circle::attributeChanged(const std::string& theID) { real(ANGLE_ID())->setValue(0); } } - else if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0 && - theID == ROTATE_ID()) + else if (theID == ROTATE_ID()) { // get cricle from results std::shared_ptr aSelection; diff --git a/src/SketchPlugin/SketchPlugin_Circle.h b/src/SketchPlugin/SketchPlugin_Circle.h index 0f620d7a7..fa843984b 100644 --- a/src/SketchPlugin/SketchPlugin_Circle.h +++ b/src/SketchPlugin/SketchPlugin_Circle.h @@ -80,16 +80,6 @@ class SketchPlugin_Circle: public SketchPlugin_SketchEntity return MY_KIND; } - static const int THE_VERSION_0 = 0; - static const int THE_VERSION_1 = 20232206; - - /// Attribute name of the version of Circle feature - inline static const std::string& VERSION_ID() - { - static const std::string MY_VERSION_ID("version"); - return MY_VERSION_ID; - } - /// Returns true is sketch element is under the rigid constraint SKETCHPLUGIN_EXPORT virtual bool isFixed(); diff --git a/src/SketchPlugin/SketchPlugin_MacroCircle.cpp b/src/SketchPlugin/SketchPlugin_MacroCircle.cpp index 4f107ebe5..97afaa9c0 100644 --- a/src/SketchPlugin/SketchPlugin_MacroCircle.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroCircle.cpp @@ -117,11 +117,6 @@ void SketchPlugin_MacroCircle::initAttributes() data()->addAttribute(VERSION_ID(), ModelAPI_AttributeInteger::typeId())); aVerAttr->setIsArgument(false); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VERSION_ID()); - if (!aVerAttr->isInitialized()) { - // this is a newly created feature (not read from file), - // so, initialize the latest version - aVerAttr->setValue(SketchPlugin_Circle::THE_VERSION_1); - } string(EDIT_CIRCLE_TYPE())->setValue(""); } @@ -221,11 +216,10 @@ void SketchPlugin_MacroCircle::constraintsForCircleByCenterAndPassed(FeaturePtr this, PASSED_POINT_REF_ID(), AttributePtr(), theCircleFeature->lastResult(), true); - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - SketchPlugin_Tools::createCoincidenceOrTangency( - this, ROTATE_POINT_REF_ID(), - AttributePtr(), - theCircleFeature->lastResult(), false); + SketchPlugin_Tools::createCoincidenceOrTangency( + this, ROTATE_POINT_REF_ID(), + AttributePtr(), + theCircleFeature->lastResult(), false); } void SketchPlugin_MacroCircle::constraintsForCircleByThreePoints(FeaturePtr theCircleFeature) @@ -241,18 +235,14 @@ void SketchPlugin_MacroCircle::constraintsForCircleByThreePoints(FeaturePtr theC this, aPointRef[i], AttributePtr(), aCircleResult, true); } - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - SketchPlugin_Tools::createCoincidenceOrTangency( - this, ROTATE_POINT_REF_ID(), - AttributePtr(), - aCircleResult, false); + SketchPlugin_Tools::createCoincidenceOrTangency( + this, ROTATE_POINT_REF_ID(), + AttributePtr(), + aCircleResult, false); } void SketchPlugin_MacroCircle::computeNewAngle(std::shared_ptr& theCircle) { - if (integer(VERSION_ID())->value() < SketchPlugin_Circle::THE_VERSION_1) - return; - AttributePtr aRotateAtr = attribute(ROTATE_POINT_ID()); if (aRotateAtr->isInitialized()) { @@ -308,22 +298,16 @@ FeaturePtr SketchPlugin_MacroCircle::createCircleFeature() std::dynamic_pointer_cast( aCircleFeature->attribute(SketchPlugin_Circle::CENTER_ID()))->setValue(myCenter->x(), myCenter->y()); - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - aCircleFeature->real(SketchPlugin_Circle::ANGLE_ID())->setValue(myAngle); - } + + aCircleFeature->real(SketchPlugin_Circle::ANGLE_ID())->setValue(myAngle); aCircleFeature->real(SketchPlugin_Circle::RADIUS_ID())->setValue(myRadius); - aCircleFeature->integer(SketchPlugin_Circle::VERSION_ID())->setValue(integer(VERSION_ID())->value()); aCircleFeature->boolean(SketchPlugin_Circle::AUXILIARY_ID()) ->setValue(boolean(AUXILIARY_ID())->value()); aCircleFeature->execute(); - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - // Create point - FeaturePtr aNPoint = CreatePoint(aCircleFeature, myRotPoint); - } + // Create point + FeaturePtr aNPoint = CreatePoint(aCircleFeature, myRotPoint); return aCircleFeature; } @@ -499,17 +483,13 @@ AISObjectPtr SketchPlugin_MacroCircle::getAISObject(AISObjectPtr thePrevious) aShapes.push_back(aCircleShape); aShapes.push_back(aCenterPointShape); - // For addCircle command skip creating point - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - std::shared_ptr aRotPoint; - if (myRotPoint.get()) - aRotPoint = std::shared_ptr(aSketch->to3D(myRotPoint->x(), myRotPoint->y())); - else - aRotPoint = std::shared_ptr(aSketch->to3D(myCenter->x() + myRadius, myCenter->y())); - GeomShapePtr aNewPnt = GeomAlgoAPI_PointBuilder::vertex(aRotPoint); - aShapes.push_back(aNewPnt); - } + std::shared_ptr aRotPoint; + if (myRotPoint.get()) + aRotPoint = std::shared_ptr(aSketch->to3D(myRotPoint->x(), myRotPoint->y())); + else + aRotPoint = std::shared_ptr(aSketch->to3D(myCenter->x() + myRadius, myCenter->y())); + GeomShapePtr aNewPnt = GeomAlgoAPI_PointBuilder::vertex(aRotPoint); + aShapes.push_back(aNewPnt); std::shared_ptr aCompound = GeomAlgoAPI_CompoundBuilder::compound(aShapes); AISObjectPtr anAIS = thePrevious; @@ -537,12 +517,8 @@ void SketchPlugin_MacroCircle::attributeChanged(const std::string& theID) { std::shared_ptr aCircle; // If circle type switched reset all attributes. if(theID == CIRCLE_TYPE()) { - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) - { - SketchPlugin_Tools::resetAttribute(this, ROTATE_POINT_ID()); - SketchPlugin_Tools::resetAttribute(this, ROTATE_POINT_REF_ID()); - } - + SketchPlugin_Tools::resetAttribute(this, ROTATE_POINT_ID()); + SketchPlugin_Tools::resetAttribute(this, ROTATE_POINT_REF_ID()); SketchPlugin_Tools::resetAttribute(this, CENTER_POINT_ID()); SketchPlugin_Tools::resetAttribute(this, CENTER_POINT_REF_ID()); SketchPlugin_Tools::resetAttribute(this, PASSED_POINT_ID()); @@ -586,21 +562,17 @@ void SketchPlugin_MacroCircle::attributeChanged(const std::string& theID) { std::dynamic_pointer_cast(attribute(CENTER_POINT_ID())) ->setValue(myCenter); } + AttributeDoublePtr anAngleAttr = real(CIRCLE_ROTATE_ANGLE_ID()); - if (integer(VERSION_ID())->value() > SketchPlugin_Circle::THE_VERSION_0) + if (myRotPoint.get()) { - AttributeDoublePtr anAngleAttr = real(CIRCLE_ROTATE_ANGLE_ID()); - - if (myRotPoint.get()) - { - AttributePoint2DPtr aPointAttr = std::dynamic_pointer_cast(attribute(ROTATE_POINT_ID())); - aPointAttr->setValue(myRotPoint); - } - - if (anAngleAttr->isInitialized()) - anAngleAttr->setValue(myAngle); + AttributePoint2DPtr aPointAttr = std::dynamic_pointer_cast(attribute(ROTATE_POINT_ID())); + aPointAttr->setValue(myRotPoint); } + if (anAngleAttr->isInitialized()) + anAngleAttr->setValue(myAngle); + aRadiusAttr->setValue(myRadius); data()->blockSendAttributeUpdated(aWasBlocked, false); diff --git a/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py b/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py index 7e5ba93c0..2b0063a94 100644 --- a/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py +++ b/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py @@ -68,13 +68,6 @@ def verifyTangentCircleLine(theCircle, theLine): aDistCL = model.distancePointLine(aCenter, theLine) assert math.fabs(aDistCL - aRadius) < TOLERANCE, "Circle and line are not tangent" -#========================================================================= -# Set old version of Circle for avoid create point. -#========================================================================= -def setVersionOfCircle(theCircle, theVersion): - aCircleVersion = theCircle.integer("version") - assert (type(aCircleVersion) == ModelAPI_AttributeInteger) - aCircleVersion.setValue(theVersion) #========================================================================= # Start of test @@ -107,7 +100,6 @@ aCircleCenter = geomDataAPI_Point2D(aCircle.attribute("circle_center")) assert (not aCircleCenter.isInitialized()) aCircleRadius = aCircle.real("circle_radius") assert (type(aCircleRadius) == ModelAPI_AttributeDouble) -setVersionOfCircle(aCircle, 0) # ModelAPI_AttributeDouble.typeId() is checked in ModelAPI_TestConstants assert (aCircleRadius.attributeType() == ModelAPI_AttributeDouble.typeId()) aCircleCenter.setValue(-25., -25) @@ -141,7 +133,6 @@ assert (not aCirclePassed.isInitialized()) aCircleType = aCircle.string("circle_type") assert (not aCircleType.isInitialized()) aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 0) aCircleCenter.setValue(-25., -25) aCirclePassed.setValue(0., -25.) aRadius = model.distancePointPoint(aCircleCenter, aCirclePassed) @@ -175,7 +166,6 @@ aCircleType = aCircle.string("circle_type") assert (not aCircleType.isInitialized()) # initialize attributes aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 0) aCenterRef.setObject(aPoint.lastResult()) aCenter.setValue(aPointCoord.pnt()) aPassedRef.setAttr(aPrevCenter) @@ -215,7 +205,6 @@ aPassedRef = aCircle.refattr("passed_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 0) aCenterRef.setObject(aLine.lastResult()) anExpectedCenter = [(aLineStart[0] + aLineEnd[0]) * 0.5, (aLineStart[1] + aLineEnd[1]) * 0.5] aCenter.setValue(anExpectedCenter[0], anExpectedCenter[1]) @@ -250,7 +239,6 @@ aPassedRef = aCircle.refattr("passed_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 0) anExpectedCenter = [(aLineStart[0] + aLineEnd[0]) * 0.5 + 10., (aLineStart[1] + aLineEnd[1]) * 0.5] aCenter.setValue(anExpectedCenter[0], anExpectedCenter[1]) aPassedRef.setObject(aLine.lastResult()) @@ -280,7 +268,6 @@ aPassedRef = aCircle.refattr("passed_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 0) aCenterRef.setObject(aLine.lastResult()) aCenter.setValue(anExpectedCenter[0], anExpectedCenter[1]) aPassedRef.setObject(aLine.lastResult()) @@ -307,7 +294,6 @@ aCircleType = aCircle.string("circle_type") aCircleAngle = aCircle.real("circle_angle") # initialize attributes aCircleType.setValue("circle_type_by_center_and_passed_points") -setVersionOfCircle(aCircle, 20232206) aCenter.setValue(35., -35) anExpectedCenter = [35., -35] aPassed.setValue(45., -35) diff --git a/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py b/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py index 4c8a5cdfd..09109c3e0 100644 --- a/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py +++ b/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py @@ -82,13 +82,6 @@ def verifyTangentCircleLine(theCircle, theLine): aDistCL = model.distancePointLine(aCenter, theLine) assert math.fabs(aDistCL - aRadius) < TOLERANCE, "Circle and line are not tangent" -#========================================================================= -# Set old version of Circle for avoid create point. -#========================================================================= -def setOldVersionOfCircleFeature(theCircle): - aCircleVersion = theCircle.integer("version") - assert (type(aCircleVersion) == ModelAPI_AttributeInteger) - aCircleVersion.setValue(0) #========================================================================= # Start of test @@ -128,7 +121,6 @@ assert (not aCirclePnt3.isInitialized()) aCircleType = aCircle.string("circle_type") assert (not aCircleType.isInitialized()) aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1.setValue(expectedCenter[0] - expectedRadius, expectedCenter[1]) aCirclePnt2.setValue(expectedCenter[0] + expectedRadius, expectedCenter[1]) aCirclePnt3.setValue(expectedCenter[0], expectedCenter[1] + expectedRadius) @@ -170,7 +162,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1Ref.setAttr(aPrevCenter) aCirclePnt1.setValue(aPrevCenter.pnt()) aCirclePnt2Ref.setObject(aPoint.lastResult()) @@ -218,7 +209,6 @@ aCirclePnt1Ref = aCircle.refattr("first_point_ref") aCirclePnt2Ref = aCircle.refattr("second_point_ref") aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") -setOldVersionOfCircleFeature(aCircle) # initialize attributes aCircleType.setValue("circle_type_by_three_points") aCirclePnt1Ref.setObject(aPrevCircle.lastResult()) @@ -258,7 +248,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1Ref.setAttr(aStartPnt) aCirclePnt1.setValue(aStartPnt.pnt()) aCirclePnt2Ref.setAttr(aEndPnt) @@ -290,7 +279,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1.setValue(aLineStart[0] + aDistanceFromLine, aLineStart[1]) aCirclePnt2.setValue(aLineStart[0] - aDistanceFromLine, aLineStart[1]) aCirclePnt3Ref.setObject(aLine.lastResult()) @@ -336,7 +324,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1.setValue(0, 0) aCirclePnt2Ref.setObject(SketchLine_1.feature().lastResult()) aCirclePnt2.setValue(SketchLine_1.startPoint().x(), SketchLine_1.startPoint().y()) @@ -366,7 +353,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1.setValue(0, 0) aCirclePnt2Ref.setObject(SketchCircle_3.feature().lastResult()) aCirclePnt2.setValue(40, 0) @@ -396,7 +382,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1.setValue(0, 0) aCirclePnt2Ref.setObject(SketchLine_3.feature().lastResult()) aCirclePnt2.setValue(30, 0) @@ -426,7 +411,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1Ref.setObject(SketchLine_1.feature().lastResult()) aCirclePnt1.setValue(20, 0) aCirclePnt2Ref.setObject(SketchLine_2.feature().lastResult()) @@ -458,7 +442,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1Ref.setObject(SketchLine_1.feature().lastResult()) aCirclePnt1.setValue(20, 0) aCirclePnt2Ref.setObject(SketchLine_2.feature().lastResult()) @@ -490,7 +473,6 @@ aCirclePnt3Ref = aCircle.refattr("third_point_ref") aCircleType = aCircle.string("circle_type") # initialize attributes aCircleType.setValue("circle_type_by_three_points") -setOldVersionOfCircleFeature(aCircle) aCirclePnt1Ref.setObject(SketchCircle_1.feature().lastResult()) aCirclePnt1.setValue(10, 0) aCirclePnt2Ref.setObject(SketchCircle_2.feature().lastResult())