Salome HOME
b4e10c536ca184de1aa48d2605d8eafb150138d8
[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 process of sketch creation is comprised of:
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 could be created both in active part and a part set (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 on which to create a sketch:
31
32 .. image:: images/PlaneDefinition.png
33    :align: center
34
35 - specify plane size (equal to 25 in the example above)
36 - then select the appropriate plane in the viewer
37
38 Note that in case if there are no convenient objects for plane selection are
39 displayed in the viewer - coordinate planes will be suggested for selection:
40
41 .. image:: images/CoordinatePlanes.png
42    :align: center
43
44 After the plane for sketch is selected the following property panel will be opened:
45
46 .. image:: images/SketchPanel.png
47    :align: center
48
49 .. centered::
50   Sketch general panel
51
52 - **Reversed** check box - allows reversing the sketch plane normal
53 - **Set plane view** button - switches the viewer to the top view for the sketch plane
54 - **Show geometrical constraints** check box - turns on/off geometrical constraints displaying
55 - **Show dimensional constraints** check box - turns on/off dimensional constraints displaying
56 - **Show existing expressions** check box - turns on/off expressions displaying
57
58 Now it is possible:
59
60 - create :ref:`sketch objects <sketch_objects>`
61 - create :ref:`constraints <sketch_constraints>`
62 - perform :ref:`sketch operations <sketch_operations>`
63
64 To apply or cancel sketch creation use apply and cancel buttons from the
65 Sketch panel as well as equivalent buttons from Sketch toolbar.
66
67 The Result of operation will be a COMPOUND. Result node in the object tree is located in
68 **Constructions** folder.
69
70 Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
71
72 **TUI Command**:  *Sketch_1 = model.addSketch(PartOrPartSet, plane)*
73
74 **Arguments**:    Part or PartSet + plane.
75
76 .. _sketch_objects:
77
78 Sketch objects
79 --------------
80
81 The plug-in includes the following features for creation of 2D objects:
82
83 .. toctree::
84    :maxdepth: 1
85
86    pointFeature.rst
87    lineFeature.rst
88    rectangleFeature.rst
89    circleFeature.rst
90    arcFeature.rst
91
92 .. _sketch_constraints:
93
94 Constraints
95 -----------
96
97 Constraints are available and viewable during sketch creation or editing.
98
99 The goal of constrains creation is to fix a sketch geometry, i.e. set degrees of freedom to zero.
100
101 If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
102
103 .. image:: images/Sketch_fixed.png
104    :align: center
105
106 .. centered::
107   Fixed Sketch
108
109 If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
110
111 .. image:: images/Sketch_underconstrained.png
112    :align: center
113
114 .. centered::
115   Underconstrained Sketch
116
117 The plug-in includes the following constraints:
118
119 .. toctree::
120    :maxdepth: 1
121
122    distanceFeature.rst
123    horizontalDistFeature.rst
124    verticalDistFeature.rst
125    lengthFeature.rst
126    angleFeature.rst
127    radiusFeature.rst
128    horizontalFeature.rst
129    verticalFeature.rst
130    fixedFeature.rst
131    parallelFeature.rst
132    perpendicularFeature.rst
133    tangentFeature.rst
134    coincedentFeature.rst
135    middleFeature.rst
136    equalFeature.rst
137    collinearFeature.rst
138
139 .. _sketch_operations:
140
141 Operations
142 ----------
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