Macro Copy3DViewToClipboard

From FreeCAD Documentation
Revision as of 18:30, 3 August 2018 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

{{Macro/fr|Icon=Macro_Copy3DViewToClipboard|Name/fr=Macro Copy3DViewToClipboard|Description=Copie le contenu de la vue 3DView dans la mémoire|Author=Mario52|Version=00.01|Date=2016-09-14}

Description

Cette macro copie le contenu de la vue 3D redimensionnée en 640 x 480 pixels dans la mémoire.

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://gist.githubusercontent.com/mario52a/f5c3738f858f7b058897c6c235232cbe/raw/a10bc3b8789badc1e405541d4697d7286d9f0fd3/Macro_Copy3DViewToClipboard.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://gist.githubusercontent.com/mario52a/f5c3738f858f7b058897c6c235232cbe/raw/a10bc3b8789badc1e405541d4697d7286d9f0fd3/Macro_Copy3DViewToClipboard.FCMacro")


Utilisation

  • Lancez la macro.
  • Pressez la touche G pour copier le contenu de la vue 3D.
  • Pressez la touche Q pour quitter la macro.

PS: Si vous voulez définir une autre résolution d'image, modifiez les valeurs de la ligne numéro 33 ex:

glw.resize(640, 480)                                    # reduce the SubWindow

par

glw.resize(800, 600)                                    # reduce the SubWindow

Discussion

La discussion sur le forum Copy contents of 3D view to clipboard.

Script

L'icône pour votre barre d'outil

téléchargez la macro sur Gist Macro_Copy3DViewToClipboard.FCMacro


Other languages: