Salome HOME
187cefbcd32284196cfbca0bc504a0e84648a652
[modules/geom.git] / doc / salome / gui / GEOM / input / add_point_on_edge_operation.doc
1 /*!
2
3 \page add_point_on_edge_operation_page Add Point on Edge
4
5 \n To <b>Add Point on Edge</b> in the <b>Main Menu</b> select
6 <b>Repair - > Add Point on Edge</b>.
7
8 This operation splits an edge in two or more new edges.
9 This operation is available in <b>OCC Viewer</b> only.
10
11 The \b Result will be a \b GEOM_Object.
12
13 \n Location of a new vertex on a selected edge can be defined two ways:
14 <ol>
15   <li> We can specify a position (ranging from 0.0 to 1.0) of the
16     vertex on the selected edge either by length or by parameter.
17     <p>
18     <b>TUI Command:</b> <em>geompy.DivideEdge(Shape, EdgeID, Value,
19       IsByParameter)</em>
20     <ul>
21       <li> \em Shape is a shape which contains an edge to be divided</li>
22       <li>\em EdgeID is the ID of the edge to be divided, if it is = -1,
23         then \em Shape should be an edge itself.</li>
24       <li> \em Value is a value of parameter on edge or length parameter,
25         depending on \em IsByParameter. </li>
26       <li> \em IsByParameter is a boolean flag, specifying operation mode:
27         - \c True: \em Value is treated as a curve parameter [0..1]
28         - \c False: \em Value is treated as a length parameter [0..1] </li>
29     </ul>
30     \b Arguments: Name + 1 Edge + 1 Value setting the position of
31     the point according to one of the selected modes.
32
33     The difference between "by parameter" and "by length" modes becomes
34     apparent on the edges with irregular parametrization (for example,
35     b-splines which usually have irregular density by the length).
36     For example, value 0.5 "by length" on such edge will produce the point
37     in the middle of this edge (equidistant from both its ends); the same
38     0.5 value "by parameter" will result in the point situated closer to
39     one of the ends (depending on the actual parametrization).
40
41     \image html repair8.png
42     \n\n
43   </li>
44   <li>We can select several points that will be projected to the selected
45     edge to find the location of new vertices.
46     <p>
47     <b>TUI Command:</b> <em>geompy.DivideEdgeByPoint(Shape, Edge, Points)</em>
48     <ul>
49       <li> \em Shape is a shape which contains an edge to be divided</li>
50       <li>\em Edge is an edge to be divided (or it's ID, if it is = -1,
51         then \em Shape should be an edge itself).</li>
52       <li> \em Points is a list of points to project to \a Edge. </li>
53     </ul>
54     \b Arguments: Name + 1 Edge + 1 or more Points.
55
56     \image html divedgebypoint.png
57
58   </li>
59 </ol>
60
61 \n <b>Example:</b>
62
63 \image html image167.png "The initial edge"
64
65 \image html image168.png "The edge split in two segments"
66
67 Our <b>TUI Scripts</b> provide you with useful examples of the use of
68 \ref tui_add_point_on_edge "Repairing Operations".
69
70 */