]> SALOME platform Git repositories - modules/geom.git/blob - doc/salome/gui/GEOM/input/creating_polyline.doc
Salome HOME
0022661: EDF GEOM: [HYDRO] Integration of the polyline editor in GEOM
[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 either by linear setgments 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 Polyline created represents a shape that lies on the XOY plane. It can have the following types:
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.
20 A single edge in the result wire is obtained for a Spline or Polyline with 2 points.
21 - \b Compound of Wires and/or Vertices if there are several sections.
22
23 For the moment only one reference coordinate system for polyline creation is supported. The XOY plane of the <b>Global coordinate system</b>
24 is suggested. Implementation of another reference coordinate system is a subject of further development of this functionality.
25 Restore button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all objects.
26 For the moment this button works with only one plane.
27
28 It is possible to import a shape in this dialog using <b>Import polyline</b> selection button. To do it an imported object should satisfy conditions
29 for polyline shapes mentioned above. If a valid shape is selected, when dialog is opened, it is initialized by this shape.
30 Though the shape can be on any plane, an imported polyline will be defined on XOY plane only due to the limitation.
31
32 The group \b Sections in this dialog represents the Polyline construction framework. Its toolbar has the following operations:
33 - \b Undo
34 - \b Redo
35 - <b>Insert new section</b>
36 - <b>Addition mode</b>
37 - <b>Modification mode</b> - not implemented
38 - <b>Detection mode</b> - not implemented
39 - \b Remove
40 - <b>Join selected sections</b>
41
42 <b>Undo/Redo</b> buttons allows to undo/redo changes of the polyline.
43
44 <b>Insert new section</b> button opens a dialog that allows to add a new section:
45
46 \image html polyline_dlg_add_section.png
47
48 In this dialog it is possible to choose:
49 - \b Name of section
50 - \b Type of section
51 - \b Closed flag
52
53 To create a new section \b Add button should be clicked. \b Cancel button is used to cancel this operation.
54 After clicking \b Add button a new section is appeared on the list. Its name supplemented by its type and closedness
55 information (see icon) and the number of points (equal to 0 after creation).
56
57 To modify section parameters it is possible to double-click on a section in the list. In this case the following dialog appears:
58
59 \image html polyline_dlg_edit_section.png
60
61 To apply modifications the button \b Ok should be clicked.
62
63 <b>Addition mode</b> allows to add points to a section. It is necessary to select a particular section in a list of sections
64 and make some mouse clicks in the viewer. A section preview is recomputed after each click.
65
66 <b>Modification mode</b> and <b>Detection mode</b> are not implemented for the moment.
67
68 \b Remove button allows to remove a section. It is available if all modes are deactivated and one section is selected.
69
70 <b>Join selected sections</b> button is available in modification mode if two or more sections are selected. It is used to
71 merge several sections into the first one from selection list. Joined section has parameters of the first selected one. Points of
72 the other sections are appended at the end of the list of the first section points.
73
74 Some actions are available via popup menu by right mouse button click.
75
76 If all modes are deactivated:
77 - <b>Join all sections</b> - join all defined sections into the first one.
78 - \b Join - join sections. Available if two or more sections are selected.
79
80 In <b>Addition mode</b>:
81 - <b>Join all sections</b> - join all defined sections into the first one.
82
83 In <b>Modification mode</b>:
84 - <b>Join all sections</b> - join all defined sections into the first one.
85 - \b Join - join sections. Available if two or more sections are selected.
86 - <b>Clear all</b> - remove all sections. Available if at least one section is selected.
87 - <b>Set closed</b> - set all selected section's Closed flag. Available if at least one section is selected.
88 - <b>Set open</b>  - reset all selected section's Closed flag. Available if at least one section is selected.
89 - <b>Set polyline</b> - set all selected section's type to Polyline. Available if at least one section is selected.
90 - <b>Set spline</b>  - set all selected section's type to Spline. Available if at least one section is selected.
91
92 In <b>Detection mode</b>:
93 - <b>Join all sections</b> - join all defined sections into the first one.
94 - \b Join - join sections. Available if two or more sections are selected.
95
96 <h2>TUI Commands</h2>
97
98
99 To create the 2D polyline in TUI Polyline2D interface is used.
100
101 <em>pl = geompy.Polyline2D()</em> - returns an instance of Polyline2D interface <i>pl</i>.
102
103 See the \ref gsketcher.Polyline2D "Polyline2D" interface documentation for more information.
104
105 Our <b>TUI Scripts</b> provide you with useful examples of the use of
106 \ref tui_polyline_page "2D Polyline".
107 */