Macro View Rotation/de: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
<div class="mw-translate-fuzzy">
{{Macro/de|Icon=Text-x-python|Name=View Rotation|Name/de=View Rotation|Description=Macro provides a GUI to permit precise rotation of the objects in the view.|Author=Joe Dowsett|Version=1.0|Date=2012-01-04}}
{{Macro/de|Icon=Text-x-python|Name=View Rotation|Name/de=View Rotation|Description=Macro provides a GUI to permit precise rotation of the objects in the view.|Author=Joe Dowsett|Version=1.0|Date=2012-01-04}}
</div>


==Description==
==Description==
Line 6: Line 8:
The GUI defaults to the top right of the screen, this behaviour can be changed by editing
The GUI defaults to the top right of the screen, this behaviour can be changed by editing


{{Codeextralink|https://raw.githubusercontent.com/FreeCAD/FreeCAD-macros/master/PureGui/ViewRotation.FCMacro}}


[[File:Macro View Rotation 00.png|left|480px|Rotate view]]
[[File:Macro View Rotation 00.png|left|480px|Rotate view]]
Line 13: Line 16:
==Code==
==Code==


The lastest version of the macro is to be found at [https://github.com/FreeCAD/FreeCAD-macros/blob/master/PureGui/ViewRotation.FCMacro ViewRotation.FCMacro] but the easiest way to install this macro is through the [[Addon Manager]].

The lastest version of the macro is to be found at [https://github.com/FreeCAD/FreeCAD-macros/blob/master/PureGui/ViewRotation.FCMacro ViewRotation.FCMacro] but the easiest way to install this macro is through the [[AddonManager|Addon Manager]].




==Option==
==Option==

Revision as of 16:30, 10 December 2018

File:Text-x-python View Rotation

Beschreibung
Macro provides a GUI to permit precise rotation of the objects in the view.

Versionsmakro : 1.0
Datum der letzten Änderung : 2012-01-04
Autor: Joe Dowsett
Autor
Joe Dowsett
Herunterladen
None
Links
Macro-Version
1.0
Datum der letzten Änderung
2012-01-04
FreeCAD-Version(s)
None
Standardverknüpfung
None
Siehe auch
None

Description

This GUI allows the view to be rotated with more precision than when using the mouse. Rotation is according to axes fixed with respect to the user and not the objects, though the aim is that the objects rotate about their approximate shared centre rather than the view centre.
The GUI defaults to the top right of the screen, this behaviour can be changed by editing

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://raw.githubusercontent.com/FreeCAD/FreeCAD-macros/master/PureGui/ViewRotation.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://raw.githubusercontent.com/FreeCAD/FreeCAD-macros/master/PureGui/ViewRotation.FCMacro")


Rotate view
Rotate view

Three icons are referred to to symbolise the rotation directions. A zip file containing these icons can be found here, the images should be placed in the folder containing your macros. Please feel free to contribute better ones!

Code

The lastest version of the macro is to be found at ViewRotation.FCMacro but the easiest way to install this macro is through the Addon Manager.

Option

at the end of the function 'initUI'. The first two arguments (right-300, 0) (line 91) provide the position for the top left corner of the window - my experience is that the behaviour was as intended on Ubuntu but Vista positioned the window too high and the 0 needed to be changed to ~30.

self.setGeometry(right-300, 0, 300, 150)


Discussion page

View+Rotation