]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/Test/TestConstraintLength.py
Salome HOME
The data() methods removed from tests
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintLength.py
index b4872a6b170760caf17675e82bbcbb59e1f1ebb8..48acf2c6b612bc12b12749f1bd089b5c8025f7ca 100644 (file)
@@ -25,14 +25,13 @@ aDocument = aSession.moduleDocument()
 aSession.startOperation()
 aSketchCommonFeature = aDocument.addFeature("Sketch")
 aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature)
-aSketchFeatureData = aSketchFeature.data()
-origin = geomDataAPI_Point(aSketchFeatureData.attribute("Origin"))
+origin = geomDataAPI_Point(aSketchFeature.attribute("Origin"))
 origin.setValue(0, 0, 0)
-dirx = geomDataAPI_Dir(aSketchFeatureData.attribute("DirX"))
+dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX"))
 dirx.setValue(1, 0, 0)
-diry = geomDataAPI_Dir(aSketchFeatureData.attribute("DirY"))
+diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY"))
 diry.setValue(0, 1, 0)
-norm = geomDataAPI_Dir(aSketchFeatureData.attribute("Norm"))
+norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm"))
 norm.setValue(0, 0, 1)
 aSession.finishOperation()
 #=========================================================================
@@ -40,9 +39,8 @@ aSession.finishOperation()
 #=========================================================================
 aSession.startOperation()
 aSketchLineA = aSketchFeature.addFeature("SketchLine")
-aLineAStartPoint = geomDataAPI_Point2D(
-    aSketchLineA.data().attribute("StartPoint"))
-aLineAEndPoint = geomDataAPI_Point2D(aSketchLineA.data().attribute("EndPoint"))
+aLineAStartPoint = geomDataAPI_Point2D(aSketchLineA.attribute("StartPoint"))
+aLineAEndPoint = geomDataAPI_Point2D(aSketchLineA.attribute("EndPoint"))
 aLineAStartPoint.setValue(0., 25.)
 aLineAEndPoint.setValue(100., 25.)
 aSession.finishOperation()
@@ -51,9 +49,8 @@ aSession.finishOperation()
 #=========================================================================
 aSession.startOperation()
 aLengthConstraint = aSketchFeature.addFeature("SketchConstraintLength")
-aConstraintData = aLengthConstraint.data()
-refattrA = aConstraintData.refattr("ConstraintEntityA")
-aLength = aConstraintData.real("ConstraintValue")
+refattrA = aLengthConstraint.refattr("ConstraintEntityA")
+aLength = aLengthConstraint.real("ConstraintValue")
 assert (not refattrA.isInitialized())
 assert (not aLength.isInitialized())