4 from GeomDataAPI import *
7 #=========================================================================
8 # Initialization of the test
9 #=========================================================================
10 __updated__ = "2017-02-01"
12 aSession = ModelAPI_Session.get()
13 aDocument = aSession.moduleDocument()
16 aSession.startOperation()
17 aSketchFeature = featureToCompositeFeature(aDocument.addFeature("Sketch"))
18 origin = geomDataAPI_Point(aSketchFeature.attribute("Origin"))
19 origin.setValue(0, 0, 0)
20 dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX"))
21 dirx.setValue(1, 0, 0)
22 norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm"))
23 norm.setValue(0, 0, 1)
24 aSession.finishOperation()
27 aSession.startOperation()
28 aSketchLine = aSketchFeature.addFeature("SketchLine")
29 aLineStartPoint = geomDataAPI_Point2D(aSketchLine.attribute("StartPoint"))
30 aLineEndPoint = geomDataAPI_Point2D(aSketchLine.attribute("EndPoint"))
31 aLineStartPoint.setValue(50., 0.)
32 aLineEndPoint.setValue(100., 25.)
33 aSession.finishOperation()
36 aSession.startOperation()
37 aDocument.removeFeature(aSketchFeature)
38 aSession.finishOperation()
40 #=========================================================================
42 #=========================================================================