Draft Scale/sv: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
{{Page_in_progress}} |
|||
<languages/> |
<languages/> |
||
{{Docnav |
{{Docnav |
||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Downgrade|Downgrade]] |
|||
|[[ |
|[[Draft_Mirror|Mirror]] |
||
|[[Draft_Module|Draft]] |
|[[Draft_Module|Draft]] |
||
|IconL= |
|IconL=Draft_Rotate.svg |
||
|IconR= |
|IconR=Draft_Mirror.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
||
Line 48: | Line 50: | ||
==Scripting== |
==Scripting== |
||
⚫ | |||
⚫ | |||
The Scale tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
|||
To scale objects use the {{incode|scale}} method of the Draft module. |
|||
{{Code|code= |
{{Code|code= |
||
scaled_list = scale(objectslist, scale=Vector(1,1,1), center=Vector(0,0,0), copy=False) |
|||
}} |
}} |
||
* |
* {{incode|objectslist}} contains the objects to be scaled. It is either a single object or a list of objects. |
||
* {{incode|scale}} indicates the vector that specifies by the X, Y and Z scale factors. |
|||
* |
* {{incode|center}} indicates the center point of the scaling operation. |
||
* If {{incode| |
* If {{incode|copy}} is {{incode|True}} copies are created instead of scaling the original objects. |
||
* {{incode| |
* {{incode|scaled_list}} is returned with the original scaled objects, or with the new copies. It is either a single object or a list of objects, depending on {{incode|objectslist}}. |
||
** {{incode|scaledlist}} is either a single object or a list of objects, depending on the input {{incode|objectslist}}. |
|||
Example: |
Example: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
doc = App.newDocument() |
|||
Polygon1 = Draft.makePolygon(3, radius=1200) |
|||
⚫ | |||
pts = [App.Vector(0, 0, 0), App.Vector(500, 500, 0), App.Vector(600, 0, 0)] |
|||
clone_1 = Draft.scale(Polygon1, delta1, copy=True) |
|||
wire1 = Draft.make_wire(pts, closed=True) |
|||
doc.recompute() |
|||
⚫ | |||
Polygon2 = Draft.makePolygon(5, radius=750) |
|||
wire2 = Draft.scale(wire1, scale1, copy=True) |
|||
doc.recompute() |
|||
scale2 = App.Vector(-2, -1.5, 0) |
|||
clone_2 = Draft.scale([Polygon1, Polygon2], delta2, copy=True) |
|||
Draft. |
wires = Draft.scale([wire1, wire2], scale2, copy=True) |
||
doc.recompute() |
|||
}} |
}} |
||
{{Docnav |
{{Docnav |
||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Downgrade|Downgrade]] |
|||
|[[ |
|[[Draft_Mirror|Mirror]] |
||
|[[Draft_Module|Draft]] |
|[[Draft_Module|Draft]] |
||
|IconL= |
|IconL=Draft_Rotate.svg |
||
|IconR= |
|IconR=Draft_Mirror.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
||
Line 91: | Line 98: | ||
{{Draft Tools navi{{#translation:}}}} |
{{Draft Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{clear}} |
Revision as of 10:37, 20 May 2021
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.
Draft Scale |
Menyplacering |
---|
Draft → Scale |
Arbetsbänkar |
Draft, Arch |
Standard genväg |
S C |
Introducerad i version |
- |
Se även |
Draft Clone |
Beskrivning
Detta verktyg skalar valda objekt runt en baspunkt. Om inga objekt är markerade, så kommer du ombes att välja ett.
The Scale tool can produce a copy or a Draft Clone at a defined scale. Use Draft Offset to produce a scaled copy of a wire set at a certain offset. A simple copy with no scaling can be produced with Draft Move.
This tool can be used on 2D shapes created with the Draft Workbench but can also be used on many types of 3D objects such as those created with the Part or PartDesign workbenches.
Scaling one object from a reference point to a second point
Bruk
- Select the objects that you wish to scale.
- Press the Draft Scale button, or press S then C keys. If no object is selected, you will be invited to select one.
- 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.
- Set the X, Y, and Z factors, and the appropriate result options, then press Enter or the OK button to finish the operation.
Options
- Markera en punkt i ett tomt område i 3d vyn, eller på ett existerande objekt för baspunkten, sedan en annan punkt för skalfaktorn
- x, y och z komponenterna av den andra punkten definierar skalfaktorn. Till exempel, (1,1,1) gör ingenting, (2,2,2) kommer att skala 2x i alla riktningar, (-1,1,1) kommer att spegla i x riktningen.
- Nedtryckning av CTRL kommer att snäppa din punkt till tillgängliga snäpp-punkter.
- Nedtryckning av SKIFT kommer att koppla ihop x och y värdena, så att förhållandet inte ändras
- Om du trycker på ESC så avbryts funktionen.
- Skriv in siffror för att manuellt mata in en koordinat.
- C växlar kopieringsläget på/av. Med kopiering på, så kommer objekt(en) att kopieras istället för att flyttas.
- Nedtryckning av ALT kommer att skapa en kopia, även om kopieringsknappen är av.
- Om ALT är nedtryckt, så kan du göra multipla kopior ända tills ALT släpps.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To scale objects use the scale
method of the Draft module.
scaled_list = scale(objectslist, scale=Vector(1,1,1), center=Vector(0,0,0), copy=False)
objectslist
contains the objects to be scaled. It is either a single object or a list of objects.scale
indicates the vector that specifies by the X, Y and Z scale factors.center
indicates the center point of the scaling operation.- If
copy
isTrue
copies are created instead of scaling the original objects. scaled_list
is returned with the original scaled objects, or with the new copies. It is either a single object or a list of objects, depending onobjectslist
.
Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
pts = [App.Vector(0, 0, 0), App.Vector(500, 500, 0), App.Vector(600, 0, 0)]
wire1 = Draft.make_wire(pts, closed=True)
doc.recompute()
scale1 = App.Vector(2.3, 0.75, 0)
wire2 = Draft.scale(wire1, scale1, copy=True)
doc.recompute()
scale2 = App.Vector(-2, -1.5, 0)
wires = Draft.scale([wire1, wire2], scale2, copy=True)
doc.recompute()
Draft
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub