5 gg = salome.ImportComponentGUI("GEOM")
7 # create a vertex and a vector
8 p0 = geompy.MakeVertex( 0., 0., 0.)
9 p200 = geompy.MakeVertex(200., 200., 200.)
11 # create a box from two points
12 box = geompy.MakeBoxTwoPnt(p0, p200)
14 # perform an Archimede operation on the selected shape with selected parameters
17 meshingdeflection = 0.01
18 archimede = geompy.Archimede(box, weight, waterdensity, meshingdeflection)
20 # add objects in the study
21 id_box = geompy.addToStudy(box,"Box")
22 id_archimede = geompy.addToStudy(archimede,"Archimede")
24 # display the box and the result of Archimede operation
25 gg.createAndDisplayGO(id_box)
26 gg.setDisplayMode(id_box,1)
27 gg.createAndDisplayGO(id_archimede)
28 gg.setDisplayMode(id_archimede,1)