Salome HOME
Merge branch HELP_DOCUMENTATION_EDITING into master.
[modules/shaper.git] / src / FeaturesPlugin / doc / transformationFeature.rst
1
2 Scale
3 =====
4
5 The feature **Scale** makes a scaled shape basing on the initial shape.
6
7 To create Scale in the active part:
8
9 #. select in the Main Menu *Features - > Scale* item  or
10 #. click **Scale** button in the toolbar
11
12 .. image:: images/scale.png      
13    :align: center
14
15 .. centered::
16    **Scale** button 
17
18 Two Scale algorithms are:
19
20   .. image:: images/scale_factor_32x32.png    
21     :align: left
22   by one common factor 
23
24   .. image:: images/scale_dimensions_32x32.png    
25     :align: left
26   by different factors along axes
27
28 Scale by one common factor
29 --------------------------
30
31 Scale by one common factor scales the entire object without modification the geometry of the shape: dimensions change evenly in all three orthogonal directions.
32
33 .. image:: images/Scale1.png
34   :align: center
35
36 .. centered::
37   Scale by one common factor property panel
38
39 Input fields:
40
41 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
42 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
43 - **Scale factor** defines the multiplier of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point. 
44
45 **TUI Command**:  *model.addScale(Part_doc, [shape], center, factor)*
46  
47 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ real (scale factor value).
48
49 Result
50 """"""
51
52 Result of operation is transformed initial shape.
53
54 .. image:: images/Scale_common_factor.png
55    :align: center
56
57 .. centered::
58    Scale by one common factor
59
60 **See Also** a sample TUI Script of a :ref:`tui_Scale_common_factor` operation.  
61
62 Scale by different factors along axes
63 -------------------------------------
64
65 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.
66
67 .. image:: images/Scale2.png
68   :align: center
69
70 .. centered::
71   Scale: define by different factors property panel
72
73 Input fields:
74
75 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
76 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
77 - **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. 
78
79 **TUI Command**:  *model.addScale(Part_doc, [shape], center, factors)*
80  
81 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ 3 reals (scale factor values along X. Y, Z axes).
82
83 Result
84 """"""
85
86 Result of operation is transformed initial shape.
87
88 .. image:: images/Scale_common_factor.png
89    :align: center
90
91 .. centered::
92    Scale by different factors
93
94 **See Also** a sample TUI Script of a :ref:`tui_Scale_XYZ` operation.