|
|
| Menyplacering |
|---|
| Draft -> Rotate |
| Arbetsbänkar |
| Skiss |
| Standard genväg |
| Ingen |
| Introducerad i version |
| - |
| Se även |
| Ingen |
Beskrivning
Detta verktyg roterar de markerade objekten. Om inga objekt är valda så kommer du ombes att välja ett. Sedan ombes användaren att ange rotationscentrum, startvinkel och rotationsvinkel.
The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or BIM Workbench.
Rotating an object around a center point
Bruk
See also: Draft Snap and Draft Constrain.
- Markera punkter i ett tomt område i 3d vyn, eller på ett existerande objekt.
- Nedtryckning av CTRL kommer att snäppa din punkt till tillgängliga snäpp-punkter.
- Nedtryckning av SKIFT kommer att begränsa dig vertikalt eller horisontellt i relation till rotationscentrum.
- 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.
Options
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.
- To manually enter the coordinates for the center of rotation enter the X, Y and Z component, and press Enter after each. Or you can press the
Enter Point button when you have the desired values. It is advisable to move the pointer out of the 3D View before entering coordinates.
- Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system.
- Press N or click the Continue checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing. This mode really only makes sense if copy mode is switched on. Depending on the Select base objects after copying preference, either the original objects are selected for the next command call or the copies that were created last. See Preferences.
- Press C or click the Copy checkbox to toggle copy mode. If copy mode is on, the command will create rotated copies instead of rotating the original objects.
- Press B or click the Modify subelements checkbox to toggle subelement mode. If subelement mode is on, the command will use the selected subelements instead of the whole objects. The subelements must belong to Draft Lines or Draft Wires.
- If copy mode and subelement mode are both on, and edges of Draft Wires are selected, new wires will be created from those edges.
- Holding down Alt after entering the Base angle will also toggle copy mode. While Alt is held down multiple points can be picked for the Rotation. Release Alt to finish the command and see the created copies.
- Press S to switch Draft snapping on or off.
- Press Esc or the Close button to abort the command.
Notes
- An Object that is attached cannot be rotated with the Draft Rotate command. To rotate it either its DataSupport object has to be rotated, or its DataAttachment Offset has to be changed.
- The base angle concept can be somewhat confusing. Especially since it works only when selecting points, not when specifying the angle using the input field. An explanation of how it works, with an example, can be found in this forum thread.
Preferences
See also: Preferences Editor and Draft Preferences.
- To reselect the base objects after copying objects: Edit → Preferences → Draft → General → Select base objects after copying.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To rotate objects use the rotate method of the Draft module.
rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)
objectslistcontains the objects to be rotated. It is either a single object or a list of objects.angleis the angle of rotation in degrees.centeris the center point of rotation.axisis the direction of the axis of rotation.- If
copyisTruecopies are created instead of rotating the original objects. rotated_listis returned with the original rotated objects, or with the new copies. It is either a single object or a list of objects, depending onobjectlist.
Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
polygon1 = Draft.make_polygon(3, radius=300)
Draft.move(polygon1, App.Vector(1000, 0, 0))
# Rotation around the origin
angle1 = 45
rot2 = Draft.rotate(polygon1, angle1, copy=True)
rot3 = Draft.rotate(polygon1, 2*angle1, copy=True)
rot4 = Draft.rotate(polygon1, 4*angle1, copy=True)
polygon2 = Draft.make_polygon(3, radius=1000)
polygon3 = Draft.make_polygon(5, radius=500)
Draft.move(polygon2, App.Vector(2000, 0, 0))
Draft.move(polygon3, App.Vector(2000, 0, 0))
# Rotation around another point
angle2 = 60
cen = App.Vector(3100, 0, 0)
list2 = [polygon2, polygon3]
rot_list2 = Draft.rotate(list2, angle2, center=cen, copy=True)
rot_list3 = Draft.rotate(list2, 2*angle2, center=cen, copy=True)
rot_list4 = Draft.rotate(list2, 4*angle2, center=cen, copy=True)
doc.recompute()
Denna sida hämtas från https://wiki.freecad.org/Draft_Rotate