From: jfa Date: Fri, 29 Apr 2011 12:36:35 +0000 (+0000) Subject: IMP 0021068 (Projection) X-Git-Tag: V6_3_0b1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cfda715c5c420b3d6d0046442a4e19cc142d9923;p=modules%2Fgeom.git IMP 0021068 (Projection) --- diff --git a/doc/salome/gui/GEOM/input/projection_operation.doc b/doc/salome/gui/GEOM/input/projection_operation.doc new file mode 100644 index 000000000..825dfa159 --- /dev/null +++ b/doc/salome/gui/GEOM/input/projection_operation.doc @@ -0,0 +1,27 @@ +/*! + +\page projection_operation_page Projection on a Face + +\n To produce a Projection in the Main Menu select +Operations - > Transformation - > Projection + +\n This operation makes normal projection of a Source vertex, edge + or wire on a given Target face. +\n Arguments: Name + 2 Objects. +\n The \b Result will be an \b Object. + +\image html projection_dlg.png + +\n Example: + +\image html projection_preview.png "The curve (in red) and its projection on the cylindric surface" + +\n TUI Command: geompy.MakeProjection(Source, Target), + where \em Source is a shape which has to be projected, \em Target + is a face, on which the \em Source shape will be projected. The \em + Result will be a \em GEOM_Object. + +Our TUI Scripts provide you with useful examples of the use of +\ref tui_projection "Transformation Operations". + +*/ diff --git a/doc/salome/gui/GEOM/input/transformation_operations.doc b/doc/salome/gui/GEOM/input/transformation_operations.doc index 3a46456d4..ab90c5140 100644 --- a/doc/salome/gui/GEOM/input/transformation_operations.doc +++ b/doc/salome/gui/GEOM/input/transformation_operations.doc @@ -9,22 +9,21 @@ which allow to: */ diff --git a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc index 883dcb441..09744cddf 100644 --- a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc @@ -246,6 +246,41 @@ gg.setDisplayMode(id_box,1) gg.createAndDisplayGO(id_offset) \endcode +\anchor tui_projection +

Projection

+ +\code +import geompy +import salome + +# create a cylindric face and a curve(edge) +cylinder = geompy.MakeCylinderRH(100, 300) +[face_cyl] = geompy.SubShapes(cylinder, [3]) + +p1 = geompy.MakeVertex(200, 0, 100) +p2 = geompy.MakeVertex(200, 80, 100) +p3 = geompy.MakeVertex(200, 80, 180) +p4 = geompy.MakeVertex(130, 80, 180) +p5 = geompy.MakeVertex(90, 80, 240) + +curve = geompy.MakeInterpol([p1, p2, p3, p4, p5], False, False) + +# create a new object as projection of the +# given curve on the given cylindric face +projection = geompy.MakeProjection(curve, face_cyl) + +# add objects in the study +geompy.addToStudy(cylinder, "cylinder") +geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl") +geompy.addToStudy(p1, "p1") +geompy.addToStudy(p2, "p2") +geompy.addToStudy(p3, "p3") +geompy.addToStudy(p4, "p4") +geompy.addToStudy(p5, "p5") +geompy.addToStudy(curve, "curve") +geompy.addToStudy(projection, "projection") +\endcode + \anchor tui_multi_translation

Multi Translation