Salome HOME
Task #3016: 3.2 To add a mode «through all» for features RevolutionCut and RevolutionFuse
[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   by one common factor 
18
19   .. image:: images/scale_dimensions_32x32.png    
20     :align: left
21   by different factors along axes
22
23 Scale by one common factor
24 --------------------------
25
26 Scale by one common factor scales the entire object without modification the geometry of the shape: dimensions change evenly in all three orthogonal directions.
27
28 .. image:: images/Scale1.png
29   :align: center
30
31 .. centered::
32   Scale by one common factor property panel
33
34 Input fields:
35
36 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
37 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
38 - **Scale factor** defines the multiplier of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point. 
39
40 **TUI Command**:
41
42 .. py:function:: model.addScale(Part_doc, [shape], center, factor)
43  
44     :param part: The current part object.
45     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
46     :param object: A center point in format *model.selection(TYPE, shape)*.
47     :param real: Scale factor.
48     :return: Result object.
49
50 Result
51 """"""
52
53 Result of operation is transformed initial shape shown in wireframe mode together  with initial shape in shading mode.
54
55 .. image:: images/Scale_common_factor.png
56    :align: center
57
58 .. centered::
59    Scale by one common factor
60
61 **See Also** a sample TUI Script of :ref:`tui_Scale_common_factor` operation.  
62
63 Scale by different factors along axes
64 -------------------------------------
65
66 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.
67
68 .. image:: images/Scale2.png
69   :align: center
70
71 .. centered::
72   Scale: define by different factors property panel
73
74 Input fields:
75
76 - **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser;
77 - **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser;
78 - **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. 
79
80 **TUI Command**:
81
82 .. py:function:: model.addScale(Part_doc, [shape], center, factors)
83  
84     :param part: The current part object.
85     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
86     :param object: A center point in format *model.selection(TYPE, shape)*.
87     :param list: A list of three scale factor values along X. Y, Z axes.
88     :return: Result object.
89
90 Result
91 """"""
92
93 Result of operation is transformed initial shape.
94
95 .. image:: images/Scale_XYZ.png
96    :align: center
97
98 .. centered::
99    Scale by different factors
100
101 **See Also** a sample TUI Script of :ref:`tui_Scale_XYZ` operation.