Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[modules/shaper.git] / src / FeaturesPlugin / doc / transformationFeature.rst
1 .. |scale.icon|    image:: images/scale.png
2
3 Scale
4 =====
5
6 **Scale** feature makes a scaled shape basing on the initial shape.
7
8 To create a Scale in the active part:
9
10 #. select in the Main Menu *Features - > Scale* item  or
11 #. click |scale.icon| **Scale** button in the toolbar
12
13 Two Scale algorithms are:
14
15 .. image:: images/scale_factor_32x32.png    
16    :align: left
17    :height: 24px
18
19 by one common factor 
20
21 .. image:: images/scale_dimensions_32x32.png    
22    :align: left
23    :height: 24px
24
25 by different factors along axes
26
27 --------------------------------------------------------------------------------
28
29 Scale by one common factor
30 --------------------------
31
32 Scale by one common factor scales the entire object without modification the geometry of the shape: dimensions change evenly in all three orthogonal directions.
33
34 .. image:: images/Scale1.png
35   :align: center
36
37 .. centered::
38   Scale by one common factor property panel
39
40 Input fields:
41
42 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
43 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
44 - **Scale factor** defines the multiplier of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point. 
45
46 **TUI Command**:
47
48 .. py:function:: model.addScale(Part_doc, [shape], center, factor)
49  
50     :param part: The current part object.
51     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
52     :param object: A center point in format *model.selection(TYPE, shape)*.
53     :param real: Scale factor.
54     :return: Result object.
55
56 Result
57 """"""
58
59 Result of operation is transformed initial shape shown in wireframe mode together  with initial shape in shading mode.
60
61 .. image:: images/Scale_common_factor.png
62    :align: center
63
64 .. centered::
65    Scale by one common factor
66
67 **See Also** a sample TUI Script of :ref:`tui_Scale_common_factor` operation.  
68
69 Scale by different factors along axes
70 -------------------------------------
71
72 Scale by different factors along axes is a general transformation, which can modify the geometry, for example, a sphere can be transformed into an ellipsoid.
73
74 .. image:: images/Scale2.png
75   :align: center
76
77 .. centered::
78   Scale: define by different factors property panel
79
80 Input fields:
81
82 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
83 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
84 - **Scale factor in X**, **Scale factor in Y**, **Scale factor in Z** define the the multipliers of axial dimensions.  If Scale Factor is negative, the object is mirrored through the Central Point. 
85
86 **TUI Command**:
87
88 .. py:function:: model.addScale(Part_doc, [shape], center, factors)
89  
90     :param part: The current part object.
91     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
92     :param object: A center point in format *model.selection(TYPE, shape)*.
93     :param list: A list of three scale factor values along X. Y, Z axes.
94     :return: Result object.
95
96 Result
97 """"""
98
99 Result of operation is transformed initial shape.
100
101 .. image:: images/Scale_XYZ.png
102    :align: center
103
104 .. centered::
105    Scale by different factors
106
107 **See Also** a sample TUI Script of :ref:`tui_Scale_XYZ` operation.