Salome HOME
0022380: EDF 2746 GEOM: Accept compounds of points as an input for "Smoothing surface"
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_complex_objs.doc
index 29813a9a6d86e336dba8a07b31571117b7d9dd9d..61ce18b5a126d1aa268b8735674cb46d87f98225 100644 (file)
 
 \anchor tui_creation_prism
 <br><h2>Creation of a Prism</h2>
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(   0.,   0.,   0.)
-p2 = geompy.MakeVertex( 100.,   0.,   0.)
-p3 = geompy.MakeVertex( 100., 100.,   0.)
-p4 = geompy.MakeVertex(   0., 100.,   0.)
-p5 = geompy.MakeVertex(   0.,   0.,  60.)
-p6 = geompy.MakeVertex(-100.,   0.,   0.)
-p7 = geompy.MakeVertex(-100.,-100.,   0.)
-p8 = geompy.MakeVertex(   0.,-100.,   0.)
-
-# create a vector from the given components
-vector = geompy.MakeVectorDXDYDZ(50., 50., 50.)
-
-#create vectors from two points
-vector1_arc1 = geompy.MakeVector(p1, p2)
-vector2_arc1 = geompy.MakeVector(p1, p4)
-vector1_arc2 = geompy.MakeVector(p1, p6)
-vector2_arc2 = geompy.MakeVector(p1, p8)
-
-# create arcs from three points
-arc1 = geompy.MakeArc(p2, p3, p4)
-arc2 = geompy.MakeArc(p6, p7, p8)
-
-# create wires
-wire1 = geompy.MakeWire([vector1_arc1, arc1, vector2_arc1])
-wire2 = geompy.MakeWire([vector1_arc2, arc2, vector2_arc2])
-
-# create faces
-isPlanarWanted = 1
-face1 = geompy.MakeFace(wire1, isPlanarWanted)
-face2 = geompy.MakeFace(wire2, isPlanarWanted)
-
-# create prisms
-prism1 = geompy.MakePrism(face2, p1, p5)
-prism2 = geompy.MakePrismVecH(face1, vector, 50)
-
-# add objects in the study
-id_face1   = geompy.addToStudy(face1,"Face1")
-id_face2   = geompy.addToStudy(face2,"Face2")
-id_prism1 = geompy.addToStudy(prism1,"Prism1")
-id_prism2 = geompy.addToStudy(prism2,"Prism2")
-
-# display cylinders
-gg.createAndDisplayGO(id_face1)
-gg.setDisplayMode(id_face1,1)
-gg.createAndDisplayGO(id_face2)
-gg.setDisplayMode(id_face2,1)
-gg.createAndDisplayGO(id_prism1)
-gg.setDisplayMode(id_prism1,1)
-gg.createAndDisplayGO(id_prism2)
-gg.setDisplayMode(id_prism2,1) 
-\endcode
+\tui_script{complex_objs_ex01.py}
 
 \anchor tui_creation_revolution
 <br><h2>Creation of a Revolution</h2>
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(  10.,  10.,  10.)
-p2 = geompy.MakeVertex(  15.,  15.,  50.)
-p3 = geompy.MakeVertex(  40.,  40.,   0.)
-
-#create vectors from two points
-vector1 = geompy.MakeVector(p1, p2)
-vector2 = geompy.MakeVector(p1, p3)
-
-# create a vector from the given components
-vector3 = geompy.MakeVectorDXDYDZ(-20., -20., 100.)
-
-# create a wire
-wire = geompy.MakeWire([vector1, vector2])
-
-# create a revolution
-revolution = geompy.MakeRevolution(wire, vector3, 2.3)
-
-# add objects in the study
-id_vector3    = geompy.addToStudy(vector3,"Axis")
-id_wire       = geompy.addToStudy(wire,"Wire")
-id_revolution = geompy.addToStudy(revolution,"Revolution")
-
-# display the vector, the wire and the revolution
-gg.createAndDisplayGO(id_vector3)
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_revolution)
-gg.setDisplayMode(id_revolution,1) 
-\endcode
+\tui_script{complex_objs_ex02.py}
 
 \anchor tui_creation_filling
 <br><h2>Creation of a Filling</h2>
+\tui_script{complex_objs_ex03.py}
 
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-mindeg = 2
-maxdeg = 5
-tol3d  = 0.0001
-tol2d  = 0.0001
-nbiter = 5
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(  -30.,  -30.,  50.)
-p2 = geompy.MakeVertex(  -60.,  -60.,  30.)
-p3 = geompy.MakeVertex(  -30.,  -30.,  10.)
-
-# create an arc from three points
-arc = geompy.MakeArc(p1, p2, p3)
-ShapeListCompound = []
-i = 0
-while i <= 3 :
-    S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
-    ShapeListCompound.append(S)
-    i = i + 1
-
-compound = geompy.MakeCompound(ShapeListCompound)
-
-# create a filling
-filling = geompy.MakeFilling(compound, mindeg, maxdeg, tol3d, tol2d, nbiter)
-
-# add objects in the study
-id_compound = geompy.addToStudy(compound,"Compound")
-id_filling = geompy.addToStudy(filling,"Filling")
-
-# display the compound and the filling
-gg.createAndDisplayGO(id_compound)
-gg.createAndDisplayGO(id_filling)
-gg.setDisplayMode(id_filling,1) 
-\endcode
 \anchor tui_creation_pipe
 <br><h2>Creation of a Pipe</h2>
+\tui_script{complex_objs_ex04.py}
 
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0   = geompy.MakeVertex(0.  , 0.  , 0.  )
-px   = geompy.MakeVertex(100., 0.  , 0.  )
-py   = geompy.MakeVertex(0.  , 100., 0.  )
-pz   = geompy.MakeVertex(0.  , 0.  , 100.)
-pxyz = geompy.MakeVertex(100., 100., 100.)
-
-# create a vector from two points
-vxy = geompy.MakeVector(px, py)
-
-# create an arc from three points
-arc = geompy.MakeArc(py, pz, px)
+\anchor tui_creation_pipe_with_diff_sec
+<br><h2>Creation of a PipeWithDifferentSections</h2>
+\tui_script{complex_objs_ex05.py}
 
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
+\anchor tui_creation_pipe_with_shell_sec
+<br><h2>Creation of a PipeWithShellSections</h2>
+\tui_script{complex_objs_ex06.py}
 
-# create an edge
-edge = geompy.MakeEdge(p0, pxyz)
+\anchor tui_creation_pipe_without_path
+<br><h2>Creation of a PipeShellsWithoutPath</h2>
+\tui_script{complex_objs_ex07.py}
 
-# create a pipe
-pipe = geompy.MakePipe(wire, edge)
+\anchor tui_creation_pipe_binormal_along_vector
+<br><h2>Creation of a PipeBiNormalAlongVector</h2>
+\tui_script{complex_objs_ex08.py}
 
-# add objects in the study
-id_wire = geompy.addToStudy(wire,"Wire")
-id_edge = geompy.addToStudy(edge,"Edge")
-id_pipe = geompy.addToStudy(pipe,"Pipe")
+\anchor tui_creation_pipe_path
+<br><h2>Creation of a Middle Path</h2>
+\tui_script{complex_objs_ex09.py}
 
-# display the wire, the edge (path) and the pipe
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_edge)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1) 
-\endcode
+\anchor tui_creation_tangent_plane_on_face
+<br><h2>Creation of Tangent Plane On Face</h2>
+\tui_script{complex_objs_ex10.py}
 
-*/
\ No newline at end of file
+*/