6 #import SMESH_BasicHypothesis_idl
10 geom = salome.lcc.FindOrLoadComponent("FactoryServer", "Geometry")
11 myBuilder = salome.myStudy.NewBuilder()
14 smeshgui = salome.ImportComponentGUI("SMESH")
15 smeshgui.Init(salome.myStudyId);
17 ShapeTypeCompSolid = 1
27 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
28 idbox = geompy.addToStudy(box,"box")
30 # ---- add first face of box in study
32 subShapeList=geompy.SubShapeAll(box,ShapeTypeFace)
34 name = geompy.SubShapeName( face._get_Name(), box._get_Name() )
36 idface=geompy.addToStudyInFather(box,face,name)
38 # ---- add shell from box in study
40 subShellList=geompy.SubShapeAll(box,ShapeTypeShell)
41 shell = subShellList[0]
42 name = geompy.SubShapeName( shell._get_Name(), box._get_Name() )
44 idshell=geompy.addToStudyInFather(box,shell,name)
46 # ---- add first edge of face in study
48 edgeList = geompy.SubShapeAll(face,ShapeTypeEdge)
50 name = geompy.SubShapeName( edge._get_Name(), face._get_Name() )
52 idedge=geompy.addToStudyInFather(face,edge,name)
54 sg.updateObjBrowser(1);