Macro Screen Wiki

From FreeCAD Documentation
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎français • ‎italiano

Macro Screen Wiki.png Macro Screen Wiki

Description
Special macro for the Wiki Worker. This macro allows to save the 3D view in the desired format. The 3D view or the full 3D window of FreeCAD takes the desired dimensions. A rotation of the selected object or of the 3D view is possible to give a rotation angle the number of images is calculated automatically it is possible to give a departure angle and an arrival angle. You must use another Gimp example program to assemble the images and create the animated file.

Macro version: 00.03
Last modified: 2020/10/30
FreeCAD version: 0.19
Download: Download the Macro_Screen_Wiki.png image and paste it in the same directory of the macro
Author
Mario52
Download
Download the Macro_Screen_Wiki.png image and paste it in the same directory of the macro
Links
Macro Version
00.03
Date last modified
2020/10/30
FreeCAD Version(s)
0.19
Default shortcut
None
See also
Macro Copy3DViewToClipboard.pngMacro_Copy3DViewToClipboard
Snip.png Macro_Snip


Description

This macro allows the user save the 3D view in a desired format. The 3D view or the full 3D window of FreeCAD takes the desired dimensions. A rotation of the selected object or of the 3D view is possible to give a rotation angle the number of images is calculated automatically it is possible to give a departure angle and an arrival angle. You must use another Gimp example program to assemble the images and create the animated file.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager.


# 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/61571ce0bd41af0471995df7c3ea855f/raw/d15e84bf796fedb39fefe5f6c16a40f814883fa0/Macro_Screen_Wiki.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/61571ce0bd41af0471995df7c3ea855f/raw/d15e84bf796fedb39fefe5f6c16a40f814883fa0/Macro_Screen_Wiki.FCMacro")
<class="rawcodeurl"><a href="https://gist.githubusercontent.com/mario52a/61571ce0bd41af0471995df7c3ea855f/raw/d15e84bf796fedb39fefe5f6c16a40f814883fa0/Macro_Screen_Wiki.FCMacro">raw code</a>


Macro Screen Wiki 00.png

Macro Screen Wiki Image and configuration window


Macro Screen Wiki 01.png

Macro Screen Wiki Rotation window


Use

Images options

Definition

  1. RadioButtonFalse.svg 400x200
  2. RadioButtonTrue.svg 600x400 (Default)
  3. RadioButtonFalse.svg 1024x768
  4. RadioButtonFalse.svg 320x240 (QVGA)
  5. RadioButtonFalse.svg 320x480 (HVGA)
  6. RadioButtonFalse.svg 400x300
  7. RadioButtonFalse.svg 480x360
  8. RadioButtonFalse.svg 640x480 (VGA)
  9. RadioButtonFalse.svg 768x576 (PAL)
  10. RadioButtonFalse.svg 800x600 (SVGA)
  11. RadioButtonFalse.svg 960x720
  12. RadioButtonFalse.svg 1024x768 (XGA)

Format image

  1. 600 px SpinBox.svg Length (Default: 600 px)
  2. 400 px SpinBox.svg Height (Default: 400 px)

Window

  1. RadioButtonFalse.svg Window FC : The complete FreeCAD window
  2. RadioButtonTrue.svg Screen 3D : The 3D view of FreeCAD

Background Color

  1. RadioButtonTrue.svg Current (Default)
  2. RadioButtonFalse.svg Color
  3. RadioButtonFalse.svg Transparent
  4. Restore

Command

  1. Set Screen: Docked window
  2. Tile Screen: Fly window
  3. Save Image: Save the image ex: imageBox_000.png (the _000 is incremented with each new image)
  4. Follow: After saving the first image, press this button to save the next image with the same name. The images saved is incremented ex: imageBox_001.png, imageBox_002.png, imageBox_003.png, etc...
  5. New image: Save one new image without change the counter
  6. Rotation: Access to the rotation menu (the title of the section "Image options" change to "Rotation options"
  7. Quit: ___Screen_Wiki end__________
  8. ToolBar: Reduce the image window in a toolBar, the Rotation option is not available in this mode

Rotation options

Rotation on

  1. RadioButtonFalse.svg 3D View: The complete view is rotated
  2. RadioButtonTrue.svg Object: The object selected is rotated

Axis

RadioButtonTrue.svg X: Rotation on X axis
RadioButtonFalse.svg Y: Rotation on Y axis
RadioButtonFalse.svg Z: Rotation on Z axis
RadioButtonFalse.svg D: Rotation on Direction.
  • To use this option: select first the object, then afterwards select the wire guideline. If RadioButtonTrue.svg D is checked and no wire is selected the direction is Vector(0, 0, 0)

Point Rotation BoundBox

  1. Object: Rotation on the BoundBox center of the object selected
  2. Sub Object: Rotation on the BoundBox center of the sub object selected

Angles

  • Angle Rotation
  1. -: Decrease the value by 10 degrees
  2. 0 Degrees SpinBox.svg : Value
  3. +: Increase the value by 10 degrees
  • Number images: The number image saved with the values given is calculated (approximation + 1)
  • Angle Begin Rotation
  1. -: Decrease the value by 10 degrees
  2. 0 Degrees SpinBox.svg : Value: Angle of the starting rotation
  3. +: Increase the value by 10 degrees
  • Degrees Angle End Rotation
  1. -: Decrease the value by 10 degrees
  2. 360 Degrees SpinBox.svg: Value: Angle of the end rotation
  3. +: Increase the value by 10 degrees

Command

  • Delay between 2 images
  1. 0,00 Delay second SpinBox.svg : If there is a problem saving images due to speed, then add a delay of X seconds.
  2. CheckBoxFalse.svg Reverse: Checked, this option reverses the rotation 3D view or Object
  3. CheckBoxTrue.svg Original position: This option restores the original position of the 3D View or the Object rotated. Instead fo the 3D view or the Object staying in the last position of the rotation.
  4. Save the animation: Save the animation

Examples

Macro Screen Wiki 03 Set Screen.png

Captured screen with dimensions of 640px x 400px


Macro Screen Wiki 04 Tile Screen.png

Same dimensions as the previous image, this one is captured as 'Tile Screen'.


Macro Screen Wiki Object Direction Object.gif

Animation mode: Object selected and direction BoundBox center Object.
The images must be assembled with a 3rd party application to create an animated .gif
such as GIMP or ScreenToGif


Macro Screen Wiki Object Direction SUBObject.gif

Animation Object Direction SubObject selected.
The images must be assembled with a 3rd party application that creates an animated .gif
such as GIMP or ScreenToGif


Macro Screen Wiki 07.png

The FreeCAD window resized. The dimension may be different from the definition (depending on the Widget, title bar etc... used.)


Versions

Version=0.03: 2020/10/30 : create a tool bar for the image and new button for unique image

Version=0.02: 2020/05/04 : correct bug color button (self.PB_01_Color obsolete)

Version=0.01: 2020/03/21