X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_complex_objs.doc;h=61ce18b5a126d1aa268b8735674cb46d87f98225;hb=ef20f40494c9ede9394c4465ed565a5a30332611;hp=29813a9a6d86e336dba8a07b31571117b7d9dd9d;hpb=239f8109c64fa0c5a2e1d87a420bad5529b57f48;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/input/tui_complex_objs.doc b/doc/salome/gui/GEOM/input/tui_complex_objs.doc index 29813a9a6..61ce18b5a 100644 --- a/doc/salome/gui/GEOM/input/tui_complex_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_complex_objs.doc @@ -4,186 +4,42 @@ \anchor tui_creation_prism

Creation of a Prism

- -\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

Creation of a Revolution

- -\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

Creation of a Filling

+\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

Creation of a Pipe

+\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 +

Creation of a PipeWithDifferentSections

+\tui_script{complex_objs_ex05.py} -# create a wire -wire = geompy.MakeWire([vxy, arc]) +\anchor tui_creation_pipe_with_shell_sec +

Creation of a PipeWithShellSections

+\tui_script{complex_objs_ex06.py} -# create an edge -edge = geompy.MakeEdge(p0, pxyz) +\anchor tui_creation_pipe_without_path +

Creation of a PipeShellsWithoutPath

+\tui_script{complex_objs_ex07.py} -# create a pipe -pipe = geompy.MakePipe(wire, edge) +\anchor tui_creation_pipe_binormal_along_vector +

Creation of a PipeBiNormalAlongVector

+\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 +

Creation of a Middle Path

+\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 +

Creation of Tangent Plane On Face

+\tui_script{complex_objs_ex10.py} -*/ \ No newline at end of file +*/