Salome HOME
Mantis issue 0021703: [CEA 577] Boolean operations on groups.
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_advanced_geom_objs.doc
1 /*!
2
3 \page tui_advanced_geom_objs_page Advanced Geometrical Objects
4
5 \anchor tui_creation_pipetshape
6 <br><h2>Creation of PipeTShape</h2>
7
8 \code
9 import geompy
10 import salome
11 gg = salome.ImportComponentGUI("GEOM")
12
13 # create PipeTShape object
14 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
15
16 # add object in the study
17 id_pipetshape = geompy.addToStudy(pipetshape[0],"PipeTShape")
18 # add groups in the study
19 for g in pipetshape[1:]:
20     geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
21     
22 # Create junction vertices
23 P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
24 P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
25 P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
26
27 # create PipeTShape object with position
28 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
29
30 # add object in the study
31 id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_position")
32 # add groups in the study
33 for g in pipetshape_position[1:]:
34     geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
35
36 # create PipeTShape with chamfer object
37 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
38
39 # add object in the study
40 id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],"PipeTShapeChamfer")
41 # add groups in the study
42 for g in pipetshapechamfer[1:]:
43     geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
44
45 # create PipeTShape with chamfer object with position
46 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
47
48 # add object in the study
49 id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],"PipeTShapeChamfer_position")
50 # add groups in the study
51 for g in pipetshapechamfer_position[1:]:
52     geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
53
54 # create PipeTShape with fillet object
55 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
56
57 # add object in the study
58 id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],"PipeTShapeFillet")
59 # add groups in the study
60 for g in pipetshapefillet[1:]:
61     geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
62
63 # create PipeTShape with fillet object with position
64 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
65
66 # add object in the study
67 id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"PipeTShapeFillet_position")
68 # add groups in the study
69 for g in pipetshapefillet_position[1:]:
70     geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
71     
72
73 # display pipetshapes
74 gg.createAndDisplayGO(id_pipetshape)
75 gg.createAndDisplayGO(id_pipetshape_position)
76 gg.createAndDisplayGO(id_pipetshapechamfer)
77 gg.createAndDisplayGO(id_pipetshapechamfer_position)
78 gg.createAndDisplayGO(id_pipetshapefillet)
79 gg.createAndDisplayGO(id_pipetshapefillet_position)
80
81 \endcode
82
83 \anchor tui_creation_divideddisk
84 <br><h2>Creation of DividedDisk</h2>
85
86 \code
87 import geompy
88 import salome
89 gg = salome.ImportComponentGUI("GEOM")
90
91 # create DividedDisk object
92 divideddisk = geompy.MakeDividedDisk(100, 50)
93
94 # add object in the study
95 id_divideddisk = geompy.addToStudy(divideddisk,"DividedDisk")
96
97 # display divideddisk
98 gg.createAndDisplayGO(id_divideddisk) 
99 \endcode
100
101 \anchor tui_creation_dividedcylinder
102 <br><h2>Creation of DividedCylinder</h2>
103
104 \code
105 import geompy
106 import salome
107 gg = salome.ImportComponentGUI("GEOM")
108
109 # create DividedCylinder object
110 dividedcylinder = geompy.MakeDividedCylinder(100, 300)
111
112 # add object in the study
113 id_dividedcylinder = geompy.addToStudy(dividedcylinder,"DividedCylinder")
114
115 # display dividedcylinder
116 gg.createAndDisplayGO(id_dividedcylinder) 
117 \endcode
118
119 <!--@@ insert new functions before this line @@ do not remove this line @@-->
120 */