Macro FCCamera/de

FCCamera

Beschreibung
Dieses Makro kann den Bildschirm in einem definierten Winkel und um eine definierte Achse drehen und eine Ebene erstellen, die zum Bildschirm ausgerichtet ist, um ein Formular in den angegebenen Ebenenpositionen zu erstellen, wobei die ausgewählte Fläche zum Bildschirm ausgerichtet ist, um die Position der Kamera zu erkennen, die Ansicht an der Fläche oder der Achse auszurichten und das Objekt an der Ansicht auszurichten.

Versionsmakro : 0.15b
Datum der letzten Änderung : 2024/12/19
FreeCAD version : 1.00 und neuer
Herunterladen : Werkzeugleisten-Symbol
Autor: Mario52
Autor
Mario52
Herunterladen
Werkzeugleisten-Symbol
Links
Macro-Version
0.15b
Datum der letzten Änderung
2024/12/19
FreeCAD-Version(s)
1.00 und neuer
Standardverknüpfung
None
Siehe auch
None

Beschreibung

Dieses Makro kann den Bildschirm in einem definierten Winkel und um eine definierte Achse drehen und erstellt eine Ebene, um den Bildschirm so auszurichten, dass eine Form in den angegebenen Ebenenpositionen mit der ausgewählten Fläche zum Bildschirm zeigt, um die Position der Kamera zu erkennen, die Ansicht an der Fläche oder der Achse auszurichten und das Objekt an der Ansicht auszurichten.

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/4aa545c23b323cf68824/raw/b31c64d26788b796750095eca4a6b92803537732/Macro%2520FCCamera.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/4aa545c23b323cf68824/raw/b31c64d26788b796750095eca4a6b92803537732/Macro%2520FCCamera.FCMacro")
<class="rawcodeurl"><a href="https://gist.githubusercontent.com/mario52a/4aa545c23b323cf68824/raw/b31c64d26788b796750095eca4a6b92803537732/Macro%2520FCCamera.FCMacro">raw code</a>


Anwendung

FCCamera
FCCamera

Kamera von Achsen: Das Dialogfeld zur Eingabe des Drehwinkels in Grad.

Winkelrotations-Achse in Grad: Wähle die Drehachse aus. X, Y oder Z.

Rotationsachse

Virtuell

Ansicht an ausgewählter Fläche ausrichten

  • To Face. : Align the view to the selected face. Click and repeat the click for NormalAt : "(0,0,1) (0,0,-1) (0,1,0) (0,-1,0) (1,0,0) (-1,0,0)"
  • To Axis. : Align the view to Axis face selected. Click and repeat the click for Surface Axis : "(0,0,1) (0,0,-1) (0,1,0) (0,-1,0) (1,0,0) (-1,0,0)"
  • Align object to view. : Align the object selected to the actual view. The changed values are : Rotation Axis((X, Y, Z), Angle), same Euler angles : Yaw, Pitch, Roll, The Translation is not modify.
  • Create plane of view. : A circular plane is created facing the screen to mouse click coordinates on an object. The radius of the plane is equal to the maximum dimension of BoundBox. If no object is selected, the plane is created to 0, 0, 0 coordinates with a radius of 20 mm. The radius is modifiable to line 515:
rayon = 20                            # Radius of plane
  • Reset. : Reset all values
  • Photo. : Section save the screen rotation an image in angle value
  • Quit. : Quit FCCamera

Abschnitt Foto

FCCamera
FCCamera
  • ComboBox Actual  : Choose your screen definition for the image format
    • Available (pre-defined):
      • "Actual" (definition actual of screen)
      • "Icon 16 x 16"
      • "Icon 32 x 32"
      • "Icon 64 x 64"
      • "Icon 128 x 128"
      • "CGA 320 x 200"
      • "QVGA 320 x 240"
      • "VGA 640 x 480"
      • "SVGA 800 x 600"
      • "XGA 1024 x 768"
      • "XGA+ 1152 x 864"
      • "SXGA 1280 x 1024"
      • "SXGA+ 1400 x 1050"
      • "UXGA 1600 x 1200"
      • "QXGA 2048 x 1536"
      • "Free"
  • Background image :
    • Actual : save image with the screen colour actual
    • White : save image with the screen colour white
    • Black : save image with the screen colour black
  • Launch : Open the file window , give the name and the path
  • Reset : Reset the default value
  • Return : Quit the photo panel and return to FCCamera panel

Verweise

Mit FCCamera verwandte Verweise

Diskussion im FreeCAD-Forum: MACRO:Work Feature 2014_12

Skript

Die Symbolbilder herunterladen FCCamera_Icones.zip

Lade das Makro auf Gist herunter Macro FCCamera.FCMacro

Beispiele

Wie man ein Winkelloch setzt

Das gleiche Ergebnis kann erzielt werden, indem man eine Ebene in der Ecke erstellt, die durch die Mausklickposition und eine Skizze vorgegeben ist.

Version

####
try:
    import webbrowser
    webbrowser.open("https://wiki.freecad.org/index.php?title=Macro_FCCamera")
except Exception:
    None
####
####
import urllib
from urllib import request

contentPage = request.urlopen("https://wiki.freecad.org/Macro_FCCamera").readlines()
####
  • ver 0.14 (20/10/2020) : *correction bug "Grid" not accepted
  • ver 0.13 (28/06/2020): adding files image in source code, create plane "On point, Center face, BBox center, Center Mass", gridLayout
  • ver 00.12.1 (12/02/2020): suppress the bad character lines 674 and 675 (accent...) again
  • ver 12 (01/08/2019): compatible Python 3 ( print to print() )
  • ver 11 (13/01/2018): minor
  • ver 10 (13/01/2018): add "def centerBoundBoxGlobal():"
  • ver 09 (08/01/2018): minor
  • ver 08 (08/01/2018): supp "Pyqt4" and adjust number image
  • ver 07 (03/01/2018): add photo panel and rotation to axis selected (wire, edge, line )
  • ver 0.6 (13/12/2016): new system for search the macro path directly in the preferences
#path = FreeCAD.ConfigGet("AppHomePath")
#path = FreeCAD.ConfigGet("UserAppData")
#path = "your path"
param = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro")# macro path
path = param.GetString("MacroPath","") + "/"                        # macro path
path = path.replace("\\","/")
App.Console.PrintMessage("Path locality to FCCamera.....images.png [ " + path + " ]"+"\n")
  • ver 0.5 06/09/2016: correct name "FCCamera_Axis_rotation_X.png" in reset block
  • ver 0.4 28/02/2016 : add display all camera detection and the Direction
  • ver 0.3 18/03/2015 : modify line 492 replace "pl.Base = App.Vector(0,0,0)" to "pl.Base = sel[0].Placement.Base" now no longer moves the form at point (0,0,0) and leaves has the coordinates
  • ver 0.2 25/02/2015 : correct names files in for compatibility Linux (case sensitive) thanks microelly2