3 aSession = ModelAPI_Session.get()
4 aDoc = aSession.moduleDocument()
6 aSession.startOperation()
7 aFeature = aDoc.addFeature("Point")
8 aFeatureData = aFeature.data()
9 assert(aFeatureData is not None)
10 # aFeatureData.string("creation_method").setValue("by_xyz")
11 aFeatureData.real("x").setValue(0.)
12 aFeatureData.real("y").setValue(0.)
13 aFeatureData.real("z").setValue(0.)
14 aFeatureName = aFeature.name()
16 aSession.finishOperation()
18 # with index "0" is Origin and then - all default constructions
19 aFeature1 = aDoc.object("Construction", 7)
20 aFeature1Name = aFeature1.data().name()
22 assert (aFeatureName == aFeature1Name)
25 assert(model.checkPythonDump())