Draft Scale: Difference between revisions

From FreeCAD Documentation
(More information on how to use)
(More details on the options)
Line 30: Line 30:


<!--T:7-->
<!--T:7-->
* To enter base point coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button when you have the desired values to insert the point.
* Fill in the X, Y and Z scaling value to define the scaling.
* Fill in the X, Y and Z factors to define the scaling along that direction.
* Checking the "Uniform scaling" option will lock the X, Y and Z to the same value
** Click the "Uniform scaling" checkbox to lock the X, Y and Z factors to the same value.
* The "Relative to Working Plane" option will consider X, Y and Z scaling values to be taken along he current [[Draft SelectPlane|Working Plane]]. Otherwise, global X, Y and Z directions are used.
** Click the "Working plane orientation" checkbox to lock the X, Y and Z scaling along the current [[Draft SelectPlane|Working Plane]]; otherwise, global X, Y and Z directions are used.
* The result of the scaling operation can be:
* Three options control the result of the scaling operation:
** A [[Draft Clone]] of the original objects, which doesn't modify the original objects, but allow you to change the scaling factor manually later on (works for all object types)
** Create a clone. A [[Draft Clone]] of the original object will be created. This will work for all object types.
::{{Emphasis|Note:}} even if the scaling factors are left at their default values (1.0, 1.0, 1.0), a clone allows you to change these factors manually in the [[property editor]].
** The original objects have their size modified (will only work with Draft objects or non-parametric Part shapes)
** A scaled copy of the base objects is produced (will work for all object types, but only the copies of Draft objects will be parametric)
:* Modify original. The original object will have its size modified. This will only work with Draft objects and non-parametric Part shapes.
:* Create a copy. A scaled copy of the original object will be created. This will work for all object types, but only the copies of Draft objects will be parametric.
::{{Emphasis|Note:}} a copy is a completely different object from the original shape; it will be created at the specified scale, and then will have its own set of properties. On the other hand, a [[Draft Clone]] is linked to the original shape and the only property that can be changed is the scale.


==Scripting== <!--T:8-->
==Scripting== <!--T:8-->

Revision as of 18:42, 13 November 2018

Draft Scale

Menu location
Draft → Scale
Workbenches
Draft, Arch
Default shortcut
S C
Introduced in version
-
See also
Draft Clone, Draft Offset

Description

The Scale tool scales selected objects around a base point. If no object is selected, you will be invited to select one.

File:Draft Scale example.jpg

How to use

  1. Select objects you wish to scale.
  2. Press the Draft Scale button, or press S then C keys.
  3. Click a first point on the 3D view, or type a coordinate and press the add point button. This serves as the base point of the operation.
  4. Change the X factor, Y factor, or Z factor and press Enter or the OK button to finish the scaling.

Options

  • To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component. You can press the add point button when you have the desired values to insert the point.
  • Fill in the X, Y and Z factors to define the scaling along that direction.
    • Click the "Uniform scaling" checkbox to lock the X, Y and Z factors to the same value.
    • Click the "Working plane orientation" checkbox to lock the X, Y and Z scaling along the current Working Plane; otherwise, global X, Y and Z directions are used.
  • Three options control the result of the scaling operation:
    • Create a clone. A Draft Clone of the original object will be created. This will work for all object types.
Note: even if the scaling factors are left at their default values (1.0, 1.0, 1.0), a clone allows you to change these factors manually in the property editor.
  • Modify original. The original object will have its size modified. This will only work with Draft objects and non-parametric Part shapes.
  • Create a copy. A scaled copy of the original object will be created. This will work for all object types, but only the copies of Draft objects will be parametric.
Note: a copy is a completely different object from the original shape; it will be created at the specified scale, and then will have its own set of properties. On the other hand, a Draft Clone is linked to the original shape and the only property that can be changed is the scale.

Scripting

The Scale tool can by used in macros and from the python console by using the following function:

scale (objects,vector,[center,copy,legacy])
  • Scales the objects contained in objects (that can be a list of objects or an object) of the given scale factors defined by the given vector (in X, Y and Z directions) around the given center.
  • If legacy is True, direct (old) mode is used, otherwise a parametric copy is made.
  • If copy is True, the actual objects are not moved, but copies are created instead.
  • The objects (or their copies) are returned.

Example:

import FreeCAD,Draft
Draft.scale(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,2,2))