1 # Creation of PipeTShape
5 gg = salome.ImportComponentGUI("GEOM")
7 # create PipeTShape object
8 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
10 # add object in the study
11 id_pipetshape = geompy.addToStudy(pipetshape[0],"PipeTShape")
12 # add groups in the study
13 for g in pipetshape[1:]:
14 geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
16 # Create junction vertices
17 P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
18 P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
19 P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
21 # create PipeTShape object with position
22 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
24 # add object in the study
25 id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_position")
26 # add groups in the study
27 for g in pipetshape_position[1:]:
28 geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
30 # create PipeTShape object with left thickness reduction
31 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
32 theRL=60, theWL=20, theLtransL=40, theLthinL=20)
34 # add object in the study
35 id_pipetshape_thr = geompy.addToStudy(pipetshape_thr[0],"PipeTShape_left_thickness_reduction")
36 # add groups in the study
37 for g in pipetshape_thr[1:]:
38 geompy.addToStudyInFather(pipetshape_thr[0], g, g.GetName())
40 # create PipeTShape with chamfer object
41 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
43 # add object in the study
44 id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],"PipeTShapeChamfer")
45 # add groups in the study
46 for g in pipetshapechamfer[1:]:
47 geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
49 # create PipeTShape with chamfer object with position
50 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
52 # add object in the study
53 id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],"PipeTShapeChamfer_position")
54 # add groups in the study
55 for g in pipetshapechamfer_position[1:]:
56 geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
58 # create PipeTShape with chamfer object with left and right thickness reductions
59 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0,
60 theRL=60, theWL=20, theLtransL=40, theLthinL=20,
61 theRR=40, theWR=10, theLtransR=60, theLthinR=30)
63 # add object in the study
64 id_pipetshapechamfer_thr = geompy.addToStudy(pipetshapechamfer_thr[0],"PipeTShapeChamfer_two_thickness_reductions")
65 # add groups in the study
66 for g in pipetshapechamfer_thr[1:]:
67 geompy.addToStudyInFather(pipetshapechamfer_thr[0], g, g.GetName())
69 # create PipeTShape with fillet object
70 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
72 # add object in the study
73 id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],"PipeTShapeFillet")
74 # add groups in the study
75 for g in pipetshapefillet[1:]:
76 geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
78 # create PipeTShape with fillet object with position
79 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
81 # add object in the study
82 id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"PipeTShapeFillet_position")
83 # add groups in the study
84 for g in pipetshapefillet_position[1:]:
85 geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
87 # create PipeTShape with fillet object with three thickness reductions
88 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
89 5.0, True, None, None, None,
94 # add object in the study
95 id_pipetshapefillet_thr = geompy.addToStudy(pipetshapefillet_thr[0],"PipeTShapeFillet_three_thickness_reductions")
96 # add groups in the study
97 for g in pipetshapefillet_thr[1:]:
98 geompy.addToStudyInFather(pipetshapefillet_thr[0], g, g.GetName())
101 # display pipetshapes
102 gg.createAndDisplayGO(id_pipetshape)
103 gg.createAndDisplayGO(id_pipetshape_position)
104 gg.createAndDisplayGO(id_pipetshape_thr)
105 gg.createAndDisplayGO(id_pipetshapechamfer)
106 gg.createAndDisplayGO(id_pipetshapechamfer_position)
107 gg.createAndDisplayGO(id_pipetshapechamfer_thr)
108 gg.createAndDisplayGO(id_pipetshapefillet)
109 gg.createAndDisplayGO(id_pipetshapefillet_position)
110 gg.createAndDisplayGO(id_pipetshapefillet_thr)