]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/doc/SketchPlugin.rst
Salome HOME
Merge remote-tracking branch 'origin/CEA_2019'
[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 - **Change sketch plane** button - allows to change working plane of the current sketch.
53
54 Now it is possible to:
55
56 - create :ref:`sketch objects <sketch_objects>`
57 - create :ref:`constraints <sketch_constraints>`
58 - perform :ref:`sketch operations <sketch_operations>`
59
60 To apply or cancel sketch creation use Apply and Cancel buttons from the
61 Sketch panel as well as equivalent buttons from Sketch toolbar.
62
63 The Result of operation will be a COMPOUND. In the object tree, Result node is located in
64 **Constructions** folder.
65
66 The Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
67
68 **TUI Command**:
69
70 .. py:function:: model.addSketch(PartOrPartSet, plane)
71
72     :param part: The current part object.
73     :param object: A plane.
74     :return: Result object.
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    ellipseFeature.rst
92    arcEllipseFeature.rst
93
94 .. _sketch_constraints:
95
96 Constraints
97 -----------
98
99 Constraints are available and viewable during sketch creation or editing.
100
101 The goal of constraints creation is to fix sketch geometry, i.e. set degrees of freedom to zero.
102
103 If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
104
105 .. image:: images/Sketch_fixed.png
106    :align: center
107
108 .. centered::
109   Fixed Sketch
110
111 If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
112
113 .. image:: images/Sketch_underconstrained.png
114    :align: center
115
116 .. centered::
117   Underconstrained Sketch
118
119 The plug-in includes the following constraints:
120
121 .. toctree::
122    :maxdepth: 1
123
124    distanceFeature.rst
125    horizontalDistFeature.rst
126    verticalDistFeature.rst
127    lengthFeature.rst
128    angleFeature.rst
129    radiusFeature.rst
130    horizontalFeature.rst
131    verticalFeature.rst
132    fixedFeature.rst
133    parallelFeature.rst
134    perpendicularFeature.rst
135    tangentFeature.rst
136    coincedentFeature.rst
137    middleFeature.rst
138    equalFeature.rst
139    collinearFeature.rst
140
141 .. _sketch_operations:
142
143 Operations
144 ----------
145 Operations modify existing features of the sketch or create new ones by copying them.
146
147 The plug-in includes the following operations:
148
149 .. toctree::
150    :maxdepth: 1
151
152    filletFeature.rst
153    splitFeature.rst
154    trimFeature.rst
155    projectionFeature.rst
156    intersectionFeature.rst
157    mirrorFeature.rst
158    translationFeature.rst
159    rotationFeature.rst
160    sketchDrawer.rst