Salome HOME
Merge remote branch 'origin/Doc_update_ver741' into V7_5_BR
[modules/geom.git] / doc / salome / gui / GEOM / input / creating_polyline.doc
1 /*!
2
3 \page create_polyline_page 2D Polyline
4
5 The 2D Polyline allows drawing arbitrary 2D shapes. 
6
7 To create a <b>2D Polyline</b> select in the main menu  <b>New Entity -> Basic -> 2D Polyline</b>.
8
9 \image html polyline_dlg.png
10
11 A polyline represents a section or a set of sections. Each section is constructed from a sequence of 2D points
12 connected  by either linear segments or an interpolation curve. Every section has its own attributes:
13 - \b Name, 
14 - \b Type (Polyline or Spline),
15 - \b Closed flag.
16
17 A created Polyline represents a shape that lies on the XOY plane. Its type can be one of the following:
18 - \b Vertex for a single section with only 1 point.
19 - \b Wire for a single section with 2 or more points. A Wire can have multiple edges for more then 2 points if the section type is Polyline. A single edge in the resulting wire is obtained for a Spline or Polyline with 2 points.
20 - \b Compound of Wires and/or Vertices if there are several sections.
21
22 For the moment only one reference coordinate system for polyline creation is supported, which is the XOY plane of the <b>Global coordinate system</b>. 
23 \b Restore button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all objects.
24 For the moment this button works with only one plane.
25
26 It is possible to import a shape in this dialog using <b>Import polyline</b> selection button. An imported object should meet the conditions for polyline shapes mentioned above. If a valid shape is selected, when the dialog is opened, it is initialized by this shape.
27 Though the shape can be on any plane, the imported polyline will be defined on XOY plane only due to the limitation.
28
29 The group \b Sections in this dialog represents the Polyline construction framework. 
30
31 The buttons <b>Undo</b> and <b>Redo</b> allow to undo or redo the changes of the polyline.
32
33 <b>Insert new section</b> button opens the corresponding dialog:
34
35 \image html polyline_dlg_add_section.png
36
37 In this dialog it is possible to choose:
38 - \b Name of section;
39 - \b Type of section;
40 - Set \b Closed flag.
41
42 To create a new section, click \b Add button. \b Cancel button is used to cancel this operation.
43 After clicking \b Add button a new section appears in the list. Its name is generated automatically depending on its type, closed or opened state and the number of points (equal to 0 after creation).
44
45 To modify section parameters, double-click on a section in the list. In this case the following dialog appears:
46
47 \image html polyline_dlg_edit_section.png
48
49 To apply the modifications, click \b Ok button.
50
51 <b>Addition mode</b> allows adding points to a section. Select a particular section in the list of sections
52 and left-click in the viewer to add new nodes to the section. A section preview is recomputed after each click.
53
54 <b>Modification mode</b> and <b>Detection mode</b> are not implemented for the moment.
55
56 \b Remove button allows removing a section. It is available if all modes are deactivated and one section is selected.
57
58 <b>Join selected sections</b> button is available in modification mode if two or more sections are selected. It is used to
59 merge several sections into the first one from the selection list. The points of the merged sections are appended at the end of the list of points of the first section.
60
61 Some actions are available via the context menu activated by right mouse button click.
62 - <b>Join all sections</b> - joins all defined sections into the first one.
63 - \b Join - joins two or more selected sections.
64 - <b>Clear all</b> - removes all selected sections. 
65 - <b>Set closed</b> - sets \b Closed flag for all selected section.
66 - <b>Set open</b>  - unset \b Closed flag for all selected sections.
67 - <b>Set polyline</b> - sets the type of all selected sections to Polyline.
68 - <b>Set spline</b>  - set the type of all selected sections to Spline. 
69
70 Different actions are available depending on the mode and selection.  
71
72 <h2>TUI Commands</h2>
73
74 To create the 2D polyline in TUI Polyline2D interface is used.
75
76 <em>pl = geompy.Polyline2D()</em> - returns an instance of Polyline2D interface <i>pl</i>.
77
78 See the \ref gsketcher.Polyline2D "Polyline2D" interface documentation for more information.
79
80 Our <b>TUI Scripts</b> provide you with useful examples of the use of
81 \ref tui_creation_polyline "2D Polyline".
82 */