Macro HighlightDifference

From FreeCAD Documentation
Revision as of 11:45, 14 December 2018 by Mario52 (talk | contribs)
Other languages:

HighlightDifference

Description
Crée un objet(s) différence entre deux objets qui se chevauchent

Version macro : 1.0
Date dernière modification : 2015-09-24
Auteur: Gaël Ecorchard
Auteur
Gaël Ecorchard
Téléchargement
None
Liens
Version Macro
1.0
Dernière modification
2015-09-24
Version(s) FreeCAD
None
Raccourci clavier
None
Voir aussi
None

Description

Crée des objets calculés sur la différence du chevauchement des objets originaux. les nouveaux objets sont coloré en rouge et vert. les objets originaux ne sont pas modifiés mais rendu transparent à 80%. le volume de chaque nouveau objet est affiché dans la Vue rapport.

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/Utility/HighlightDifference.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/Utility/HighlightDifference.FCMacro")


Le résultat de la différence entre les deux objets est créé

Result difference two objects created

Exemple

Script

Macro_HighlightDifference.FCMacro

Le code est visible sur Github: Utility/HighlightDifference.FCMacro.

Liens