6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
14 id_pipetshape = geompy.addToStudy(pipetshape[0],
"PipeTShape")
16 for g
in pipetshape[1:]:
17 geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
20 P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
21 P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
22 P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
25 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
True, P1, P2, P3)
28 id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],
"PipeTShape_position")
30 for g
in pipetshape_position[1:]:
31 geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
34 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
35 theRL=60, theWL=20, theLtransL=40, theLthinL=20)
38 id_pipetshape_thr = geompy.addToStudy(pipetshape_thr[0],
"PipeTShape_left_thickness_reduction")
40 for g
in pipetshape_thr[1:]:
41 geompy.addToStudyInFather(pipetshape_thr[0], g, g.GetName())
44 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
47 id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],
"PipeTShapeChamfer")
49 for g
in pipetshapechamfer[1:]:
50 geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
53 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0,
True, P1, P2, P3)
56 id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],
"PipeTShapeChamfer_position")
58 for g
in pipetshapechamfer_position[1:]:
59 geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
62 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0,
63 theRL=60, theWL=20, theLtransL=40, theLthinL=20,
64 theRR=40, theWR=10, theLtransR=60, theLthinR=30)
67 id_pipetshapechamfer_thr = geompy.addToStudy(pipetshapechamfer_thr[0],
"PipeTShapeChamfer_two_thickness_reductions")
69 for g
in pipetshapechamfer_thr[1:]:
70 geompy.addToStudyInFather(pipetshapechamfer_thr[0], g, g.GetName())
73 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
76 id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],
"PipeTShapeFillet")
78 for g
in pipetshapefillet[1:]:
79 geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
82 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0,
True, P1, P2, P3)
85 id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],
"PipeTShapeFillet_position")
87 for g
in pipetshapefillet_position[1:]:
88 geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
91 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
92 5.0,
True,
None,
None,
None,
98 id_pipetshapefillet_thr = geompy.addToStudy(pipetshapefillet_thr[0],
"PipeTShapeFillet_three_thickness_reductions")
100 for g
in pipetshapefillet_thr[1:]:
101 geompy.addToStudyInFather(pipetshapefillet_thr[0], g, g.GetName())
105 gg.createAndDisplayGO(id_pipetshape)
106 gg.createAndDisplayGO(id_pipetshape_position)
107 gg.createAndDisplayGO(id_pipetshape_thr)
108 gg.createAndDisplayGO(id_pipetshapechamfer)
109 gg.createAndDisplayGO(id_pipetshapechamfer_position)
110 gg.createAndDisplayGO(id_pipetshapechamfer_thr)
111 gg.createAndDisplayGO(id_pipetshapefillet)
112 gg.createAndDisplayGO(id_pipetshapefillet_position)
113 gg.createAndDisplayGO(id_pipetshapefillet_thr)
2 from salome.geom
import geomBuilder
3 geompy = geomBuilder.New(salome.myStudy)
7 geompy.MakeVertex( 0,0,0 ),
8 geompy.MakeVertex( 9,0,0 ),
9 geompy.MakeVertex( 0,9,0 ),
10 geompy.MakeVertex( 9,9,0 ),
11 geompy.MakeVertex( 3,3,1 ),
12 geompy.MakeVertex( 6,6,2 )]
15 smoothingsurface = geompy.MakeSmoothingSurface( points )
18 id_smoothingsurface = geompy.addToStudy(smoothingsurface,
"SmoothingSurface")
21 gg = salome.ImportComponentGUI(
"GEOM")
22 gg.createAndDisplayGO(id_smoothingsurface)