]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/doc/SketchPlugin.rst
Salome HOME
Merge branch 'master' into occ/bsplines
[modules/shaper.git] / src / SketchPlugin / doc / SketchPlugin.rst
1
2 .. _sketchPlugin:
3 .. |SketchButton.icon|    image:: images/SketchButton.png
4
5
6 Sketch plug-in
7 ================
8
9 Sketch plug-in includes features for creation of 2D shapes.
10
11 The sketch creation takes the following steps:
12
13 - definition of sketch plane;
14 - creation of sketch objects from scratch;
15 - generation of sketch objects via operations on the existing operations;
16 - definition of constraints.
17
18 Sketch can be created in the active part or in a partset (if there is no active part).
19
20 To create a Sketch:
21
22 #. select in the Main Menu *Sketch - > Sketch* item  or
23 #. click |SketchButton.icon| **Sketch** button in Sketch toolbar:
24
25 First define a plane for the sketch:
26
27 .. image:: images/PlaneDefinition.png
28    :align: center
29
30 - specify plane size (equal to 25 in the example above);
31 - select the appropriate plane in the viewer.
32
33 Note that coordinate planes will be suggested for selection if no convenient objects for plane selection are displayed in the viewer:
34
35 .. image:: images/CoordinatePlanes.png
36    :align: center
37
38 After the plane for sketch is selected, the following property panel will be opened:
39
40 .. image:: images/SketchPanel.png
41    :align: center
42
43 .. centered::
44   Sketch general panel
45
46 - **Reversed** check box - allows reversing the sketch plane normal;
47 - **Set plane view** button - switches the viewer to the top view for the sketch plane;
48 - **Show geometrical constraints** check box - displays/hides geometrical constraints:
49 - **Show dimensional constraints** check box - displays/hides dimensional constraints; 
50 - **Show existing expressions** check box - displays/hides expressions.
51 - **Show free points** check box - highlights free points in the current sketch if it is checked.
52 - **Automatic constraints** - automatically create horizontal or vertical constraints if angle between created line and horizontal or vertical less then angular tolerance (defined in preferences).
53 - **Change sketch plane** button - allows to change working plane of the current sketch.
54 - **Show remaining DoFs** button - highlights all sketch edges which are not fully constrained.
55
56 Now it is possible to:
57
58 - create :ref:`sketch objects <sketch_objects>`
59 - create :ref:`constraints <sketch_constraints>`
60 - perform :ref:`sketch operations <sketch_operations>`
61
62 To apply or cancel sketch creation use Apply and Cancel buttons from the
63 Sketch panel as well as equivalent buttons from Sketch toolbar.
64
65 The Result of operation will be a COMPOUND. In the object tree, Result node is located in
66 **Constructions** folder.
67
68 The Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
69
70 **TUI Command**:
71
72 .. py:function:: model.addSketch(PartOrPartSet, plane)
73
74     :param part: The current part object.
75     :param object: A plane.
76     :return: Result object.
77
78 .. _sketch_objects:
79
80 Sketch objects
81 --------------
82
83 The plug-in includes the following features for creation of 2D objects:
84
85 .. toctree::
86    :maxdepth: 1
87
88    pointFeature.rst
89    lineFeature.rst
90    rectangleFeature.rst
91    circleFeature.rst
92    arcFeature.rst
93    ellipseFeature.rst
94    arcEllipseFeature.rst
95    bsplineFeature.rst
96
97 .. _sketch_constraints:
98
99 Constraints
100 -----------
101
102 Constraints are available and viewable during sketch creation or editing.
103
104 The goal of constraints creation is to fix sketch geometry, i.e. set degrees of freedom to zero.
105
106 If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
107
108 .. image:: images/Sketch_fixed.png
109    :align: center
110
111 .. centered::
112   Fixed Sketch
113
114 If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
115
116 .. image:: images/Sketch_underconstrained.png
117    :align: center
118
119 .. centered::
120   Underconstrained Sketch
121
122 The plug-in includes the following constraints:
123
124 .. toctree::
125    :maxdepth: 1
126
127    distanceFeature.rst
128    horizontalDistFeature.rst
129    verticalDistFeature.rst
130    lengthFeature.rst
131    angleFeature.rst
132    radiusFeature.rst
133    horizontalFeature.rst
134    verticalFeature.rst
135    fixedFeature.rst
136    parallelFeature.rst
137    perpendicularFeature.rst
138    tangentFeature.rst
139    coincedentFeature.rst
140    middleFeature.rst
141    equalFeature.rst
142    collinearFeature.rst
143
144 .. _sketch_operations:
145
146 Overconstraned state
147 --------------------
148
149 Sketcher comes into overconstrained state when an extra constraint was defined. The following picture shows an example of the overconstrained state:
150
151 .. image:: images/Overconstrained.png
152    :align: center
153
154 .. centered::
155   Overconstrained Sketch
156
157 When Sketcher gets this state then:
158
159 - buttons Apply and Cancel for the whole Sketcher are blocked;
160 - a constraint which causes the overconstraint state is highlightid by red color;
161 - a warning message in sketcher Property Panel is shown with recomendation what to do in this case;
162 - an additional Undo button is shown under the warning messages;
163
164 After undoing the last operation or deletion of a conflicting constraint Sketcher will be reverted into a normal state.
165
166 Operations
167 ----------
168 Operations modify existing features of the sketch or create new ones by copying them.
169
170 The plug-in includes the following operations:
171
172 .. toctree::
173    :maxdepth: 1
174
175    filletFeature.rst
176    splitFeature.rst
177    trimFeature.rst
178    projectionFeature.rst
179    intersectionFeature.rst
180    mirrorFeature.rst
181    translationFeature.rst
182    rotationFeature.rst
183    sketchDrawer.rst