From 64e079cfbf1302eeb3f7fe60c46de6f5b73cc35f Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 17 Oct 2019 08:31:26 +0300 Subject: [PATCH] Avoid regressions after fix issue #3049. --- src/SketchAPI/SketchAPI_MacroArc.cpp | 2 +- src/SketchAPI/Test/TestSketch.py | 1 + .../Test/TestCreateArcByTransversalLine.py | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/SketchAPI/SketchAPI_MacroArc.cpp b/src/SketchAPI/SketchAPI_MacroArc.cpp index ebacfb9d1..d8f9cb6f5 100644 --- a/src/SketchAPI/SketchAPI_MacroArc.cpp +++ b/src/SketchAPI/SketchAPI_MacroArc.cpp @@ -192,7 +192,7 @@ void SketchAPI_MacroArc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoin bool theInversed) { fillAttribute(SketchPlugin_MacroArc::ARC_TYPE_BY_TANGENT_EDGE(), myarcType); - fillAttribute(theTangentPoint, mytransversalPoint); + fillAttribute(theTangentPoint, mytangentPoint); fillAttribute(theEnd, myendPoint3); fillAttribute(theInversed, myreversed); diff --git a/src/SketchAPI/Test/TestSketch.py b/src/SketchAPI/Test/TestSketch.py index 2bcf93deb..d1531e2bb 100644 --- a/src/SketchAPI/Test/TestSketch.py +++ b/src/SketchAPI/Test/TestSketch.py @@ -29,6 +29,7 @@ from salome.shaper import model class SketchTestCase(unittest.TestCase): def setUp(self): + model.begin() self.session = ModelAPI.ModelAPI_Session.get() aPartSet = self.session.moduleDocument() self.doc = model.addPart(aPartSet).document() diff --git a/src/SketchPlugin/Test/TestCreateArcByTransversalLine.py b/src/SketchPlugin/Test/TestCreateArcByTransversalLine.py index 0250f952c..2c83e6975 100644 --- a/src/SketchPlugin/Test/TestCreateArcByTransversalLine.py +++ b/src/SketchPlugin/Test/TestCreateArcByTransversalLine.py @@ -92,9 +92,9 @@ anArcEndPnt = [80., 20.] aSession.startOperation() anArc = aSketchFeature.addFeature("SketchMacroArc") assert (anArc.getKind() == "SketchMacroArc") -anArcTgPnt = anArc.refattr("tangent_point") +anArcTgPnt = anArc.refattr("transversal_point") assert (not anArcTgPnt.isInitialized()) -anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_3")) +anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_4")) assert (not anArcEnd.isInitialized()) anArcType = anArc.string("arc_type") assert (not anArcType.isInitialized()) @@ -117,8 +117,8 @@ aPrevArcEnd = geomDataAPI_Point2D(aPrevArc.attribute("end_point")) anArcEndPnt = [50., 100.] aSession.startOperation() anArc = aSketchFeature.addFeature("SketchMacroArc") -anArcTgPnt = anArc.refattr("tangent_point") -anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_3")) +anArcTgPnt = anArc.refattr("transversal_point") +anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_4")) anArcType = anArc.string("arc_type") # initialize attributes anArcType.setValue("by_transversal_line") @@ -138,8 +138,8 @@ aPrevArc = model.lastSubFeature(aSketchFeature, "SketchArc") aPrevArcEnd = geomDataAPI_Point2D(aPrevArc.attribute("end_point")) aSession.startOperation() anArc = aSketchFeature.addFeature("SketchMacroArc") -anArcTgPnt = anArc.refattr("tangent_point") -anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_3")) +anArcTgPnt = anArc.refattr("transversal_point") +anArcEnd = geomDataAPI_Point2D(anArc.attribute("end_point_4")) anArcEndRef = anArc.refattr("end_point_ref") anArcType = anArc.string("arc_type") # initialize attributes -- 2.39.2