]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid regressions after fix issue #3049.
authorazv <azv@opencascade.com>
Thu, 17 Oct 2019 05:31:26 +0000 (08:31 +0300)
committerazv <azv@opencascade.com>
Thu, 17 Oct 2019 05:32:28 +0000 (08:32 +0300)
src/SketchAPI/SketchAPI_MacroArc.cpp
src/SketchAPI/Test/TestSketch.py
src/SketchPlugin/Test/TestCreateArcByTransversalLine.py

index ebacfb9d1496ca7f8698302c806205b59e8bc7f2..d8f9cb6f5d950fbe501871133b502d3835736987 100644 (file)
@@ -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);
 
index 2bcf93deb10898d2f5177a8c47157ef31064a422..d1531e2bb505ed535e18ed6d519cef7f5da389e7 100644 (file)
@@ -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()
index 0250f952cde47fe81da2cd92c847b1a0001a2528..2c83e69753068215edf95367fc6d0301d6aad9a1 100644 (file)
@@ -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