IMP 0021068 (Projection)

This commit is contained in:
jfa 2011-04-29 12:36:35 +00:00
parent 8de0df2005
commit cfda715c5c
3 changed files with 70 additions and 9 deletions

View File

@ -0,0 +1,27 @@
/*!
\page projection_operation_page Projection on a Face
\n To produce a <b>Projection</b> in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Projection</b>
\n This operation makes normal projection of a <b>Source vertex, edge
or wire</b> on a given <b>Target face</b>.
\n <b>Arguments:</b> Name + 2 Objects.
\n The \b Result will be an \b Object.
\image html projection_dlg.png
\n <b>Example:</b>
\image html projection_preview.png "The curve (in red) and its projection on the cylindric surface"
\n <b>TUI Command:</b> <em>geompy.MakeProjection(Source, Target),</em>
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 <b>TUI Scripts</b> provide you with useful examples of the use of
\ref tui_projection "Transformation Operations".
*/

View File

@ -9,22 +9,21 @@ which allow to:
<ul>
<li>\subpage translation_operation_page "Translate" an object by a certain vector.</li>
<li>\subpage rotation_operation_page "Rotate" an object around a
certain axis by a certain angle.</li>
certain axis by a certain angle.</li>
<li>\subpage modify_location_operation_page "Move" an object to a new location.</li>
<li>\subpage mirror_operation_page "Mirror" an object through a point
an axis or a plane of symmetry.</li>
<li>\subpage scale_operation_page "Scale" an object by one or several scale
factors.</li>
<li>Create an \subpage offset_operation_page "Offset" of the object.</li>
an axis or a plane of symmetry.</li>
<li>\subpage scale_operation_page "Scale" an object by one or several scale factors.</li>
<li>Create an \subpage offset_operation_page "Offset" of an object.</li>
<li>Create a \subpage projection_operation_page "Projection" of an object on a face.</li>
<li>Create a simultaneous \subpage multi_translation_operation_page "Translation in several directions".</li>
<li>Create a simultaneous \subpage multi_rotation_operation_page</li> "Rotation in several directions".</li>
<li>Produce a \subpage fillet_operation_page "Fillet" on the selected
edges of the object.</li>
edges of an object.</li>
<li>Produce a \subpage fillet1d_operation_page "1D Fillet" on the
corners of a Wire with Planar Edges.</li>
corners of a Wire with Planar Edges.</li>
<li>Produce a \subpage fillet2d_operation_page "2D Fillet" on the corners of a Planar Face.</li>
<li>Produce a \subpage chamfer_operation_page "Chamfer" on the
selected edges of the object.</li>
<li>Produce a \subpage chamfer_operation_page "Chamfer" on the selected edges of an object.</li>
</ul>
*/

View File

@ -246,6 +246,41 @@ gg.setDisplayMode(id_box,1)
gg.createAndDisplayGO(id_offset)
\endcode
\anchor tui_projection
<br><h2>Projection</h2>
\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
<br><h2>Multi Translation</h2>