4 salome.salome_init_without_session()
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
8 gg = salome.ImportComponentGUI("GEOM")
10 # create a vertex and a vector
11 p0 = geompy.MakeVertex( 0., 0., 0.)
12 p200 = geompy.MakeVertex(200., 200., 200.)
13 pz = geompy.MakeVertex( 0., 0., 100.)
16 vxyz = geompy.MakeVectorDXDYDZ(100., 100., 100.)
18 # create a box from two points
19 box = geompy.MakeBoxTwoPnt(p0, p200)
23 plane = geompy.MakePlane(pz, vxyz, trimsize)
26 partition = geompy.MakePartition([box], [plane])
28 # add objects in the study
29 id_box = geompy.addToStudy(box,"Box")
30 id_plane = geompy.addToStudy(plane,"Plane")
31 id_partition = geompy.addToStudy(partition,"Partition")
33 # display the partition objects and the plane
34 gg.createAndDisplayGO(id_box)
35 gg.setDisplayMode(id_box,1)
36 gg.createAndDisplayGO(id_plane)
37 gg.setDisplayMode(id_plane,1)
38 gg.createAndDisplayGO(id_partition)