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()
#=========================================================================
#=========================================================================
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()
#=========================================================================
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())