Salome HOME
fd95d68e97bc450310b7a027f0f2bc4b4db0b0ea
[modules/shaper.git] / src / SketchPlugin / doc / SketchPlugin.rst
1
2 .. _sketchPlugin:
3
4
5 Sketch plug-in
6 ================
7
8 Sketch plug-in includes features for creation of 2D shapes.
9
10 The sketch creation takes the following steps:
11
12 - definition of sketch plane;
13 - creation of sketch objects from scratch;
14 - generation of sketch objects via operations on the existing operations;
15 - definition of constraints.
16
17 Sketch can be created in the active part or in a partset (if there is no active part).
18
19 To create a Sketch:
20
21 #. select in the Main Menu *Sketch - > Sketch* item  or
22 #. click **Sketch** button in Sketch toolbar:
23
24 .. image:: images/SketchButton.png
25    :align: center
26
27 .. centered::
28    **Sketch**  button
29
30 First define a plane for the sketch:
31
32 .. image:: images/PlaneDefinition.png
33    :align: center
34
35 - specify plane size (equal to 25 in the example above);
36 - select the appropriate plane in the viewer.
37
38 Note that coordinate planes will be suggested for selection if no convenient objects for plane selection are displayed in the viewer:
39
40 .. image:: images/CoordinatePlanes.png
41    :align: center
42
43 After the plane for sketch is selected, the following property panel will be opened:
44
45 .. image:: images/SketchPanel.png
46    :align: center
47
48 .. centered::
49   Sketch general panel
50
51 - **Reversed** check box - allows reversing the sketch plane normal;
52 - **Set plane view** button - switches the viewer to the top view for the sketch plane;
53 - **Show geometrical constraints** check box - displays/hides geometrical constraints:
54 - **Show dimensional constraints** check box - displays/hides dimensional constraints; 
55 - **Show existing expressions** check box - displays/hides expressions.
56
57 Now it is possible to:
58
59 - create :ref:`sketch objects <sketch_objects>`
60 - create :ref:`constraints <sketch_constraints>`
61 - perform :ref:`sketch operations <sketch_operations>`
62
63 To apply or cancel sketch creation use Apply and Cancel buttons from the
64 Sketch panel as well as equivalent buttons from Sketch toolbar.
65
66 The Result of operation will be a COMPOUND. In the object tree, Result node is located in
67 **Constructions** folder.
68
69 The Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
70
71 **TUI Command**:  *Sketch_1 = model.addSketch(PartOrPartSet, plane)*
72
73 **Arguments**:    Part or PartSet + plane.
74
75 .. _sketch_objects:
76
77 Sketch objects
78 --------------
79
80 The plug-in includes the following features for creation of 2D objects:
81
82 .. toctree::
83    :maxdepth: 1
84
85    pointFeature.rst
86    lineFeature.rst
87    rectangleFeature.rst
88    circleFeature.rst
89    arcFeature.rst
90
91 .. _sketch_constraints:
92
93 Constraints
94 -----------
95
96 Constraints are available and viewable during sketch creation or editing.
97
98 The goal of constraints creation is to fix sketch geometry, i.e. set degrees of freedom to zero.
99
100 If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
101
102 .. image:: images/Sketch_fixed.png
103    :align: center
104
105 .. centered::
106   Fixed Sketch
107
108 If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
109
110 .. image:: images/Sketch_underconstrained.png
111    :align: center
112
113 .. centered::
114   Underconstrained Sketch
115
116 The plug-in includes the following constraints:
117
118 .. toctree::
119    :maxdepth: 1
120
121    distanceFeature.rst
122    horizontalDistFeature.rst
123    verticalDistFeature.rst
124    lengthFeature.rst
125    angleFeature.rst
126    radiusFeature.rst
127    horizontalFeature.rst
128    verticalFeature.rst
129    fixedFeature.rst
130    parallelFeature.rst
131    perpendicularFeature.rst
132    tangentFeature.rst
133    coincedentFeature.rst
134    middleFeature.rst
135    equalFeature.rst
136    collinearFeature.rst
137
138 .. _sketch_operations:
139
140 Operations
141 ----------
142 Operations modify existing features of the sketch or create new ones by copying them.
143
144 The plug-in includes the following operations:
145
146 .. toctree::
147    :maxdepth: 1
148
149    filletFeature.rst
150    splitFeature.rst
151    trimFeature.rst
152    projectionFeature.rst
153    intersectionFeature.rst
154    mirrorFeature.rst
155    translationFeature.rst
156    rotationFeature.rst