2 Test case for Scale feature.
8 from salome.shaper import model
11 aSession = ModelAPI_Session.get()
14 aDocument = aSession.activeDocument()
15 aSession.startOperation()
16 model.addPart(aDocument)
17 aDocument = aSession.activeDocument()
18 aSession.finishOperation()
21 aSession.startOperation()
22 aCenterPoint = model.addPoint(aDocument, 20, 20, 0).result()
23 aBox1 = model.addBox(aDocument, 10, 10, 10)
24 aBox2 = model.addBox(aDocument, 10, 10, 10)
25 aSession.finishOperation()
27 # Perform a symmetry by a point
28 aSession.startOperation()
29 aScale1 = model.addScale(aDocument, [model.selection("SOLID", "Box_1_1")], aCenterPoint, 2.0).result()
30 aSession.finishOperation()
31 assert (aScale1 is not None)
33 # Perform a symmetry by an axis
34 aSession.startOperation()
35 aScale2 = model.addScale(aDocument, [model.selection("SOLID", "Box_2_1")], aCenterPoint, -0.5, 2, 3.7).result()
36 aSession.finishOperation()
37 assert (aScale2 is not None)