Macros recipes

From FreeCAD Documentation
Revision as of 16:50, 19 February 2021 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Macros

Esta página contiene macros para añadir funcionalidad a tu instalación de FreeCAD

If you wrote a macro, and want to include it in the categories in this page, see macro documentation to learn about properly documenting the macro.

Macros

3D View operations

  • Template:MacroLink/es Esta macro gira la vista actual 90º hacia la izquierda. Solo funciona si estas en la vista en planta.
  • Template:MacroLink/es Proporciona una interfaz gráfica de usuario GUI que permite rotar la vista una cantidad determinada en las tres direcciones.
  • Template:MacroLink/es Esta macro permite poner temporalmente una imagen de textura en los objetos seleccionados.

Animation

Code and Scripting

  • Template:MacroLink/es: muestra como dar información al usuario través de la interfaz gráfica de usuario GUI.

Conversion

Drawing Workbench

The Drawing Workbench is considered obsolete since FreeCAD 0.17. Consider using the TechDraw Workbench instead.

  • Template:MacroLink/es: Permite al usuario obtener las vistas de su objeto en un dibujo con 4 posiciones diferentes (alzado, planta, isométrica, perfil derecho). Necesita algunos cambios para ser perfectamente efectiva
  • Template:MacroLink/es: Esta macro de GUI para llenar simplemente todos los campos del cartucho de la hoja de trabajo de implementación de plan FreeCAD, el formato de la fecha y el símbolo del modo de proyección se adaptan a la región de la UE o Estados Unidos seleccionado.

Dxf 2D Draft

  • Template:MacroLink/es: Crea una rectelipse paramétrica
  • Template:MacroLink/es: se crea un círculo de 3 puntos seleccionados, los puntos pueden ser objetos (en este ejemplo reúne los dos ejemplos siguientes, todos los parámetros simplemente acordar una ventana gráfica).
  • Template:MacroLink/es: se crea un círculo de 3 puntos seleccionados 2D ortogonal.
  • Template:MacroLink/es: se crea un círculo de 3 puntos seleccionados en el espacio 3D.

Fem

  • Macro GMSH: Create FEM Meshes by GMSH Mesh Generator
  • Macro export transient FEM results: This macro exports multiple FEM result objects from a transient analysis to the VTK format and generates a PVU file which can be used to load the results directly into ParaView for post-processing.

Info and measures

  • Macro FCInfo: Gives a series of information about the selected shape and can display a conversion of length, inclination (degrees, radian, grade) shape, surface, volume and the weight of the form in the density selected in various international and Anglo-Saxon units
  • Macro FCInfo Alternate Linux: same as above, but for Linux
  • Macro FCInfoGlass: Gives a series of information about the selected shape and displayed in screen 3D
  • Macro FCInfoToMouse: Provide informations coordinates, length and angles in real time on the mouse in a bubble annotation displayed in the 3D screen
  • Macro Delta xyz: Gives the Delta values and the distance between 2 points
  • Macro ObjectInfo: User-friendly "Info" module created by a FreeCAD user
  • Macro Dump Objects: This macro generates a listing of all objects in the current document - the list can be in a window or on the Report view.
  • Macro MeasureCircle: Compute the radius of a circle by 3 points or a circular edge.
  • Macro CenterOfMass: Gives the total mass and the center of mass of multiple objects selected with the density chosen.
  • Macro SimpleProperties: Display in a concise way basic physical properties of an object (volume, bound box dimensions, ...)

Libraries

Mathematical functions

equations.

Multifunctional

  • Macro WorkFeatures: Tool utility to create plans of the axes, planes from 3 points, axes on a form, information on the coordinates of the shape and many other useful features to facilitate the creation of your project. This utility is up next in the combo view.

Object creation

  • Template:MacroLink/es: Crea un cubo a partir de 4 puntos
  • Template:MacroLink/es: crea u sólido barriendo un perfil 2D a lo largo de una trayectoria previamente seleccionada en la vista 3D. Los elementos 2D pueden crearse con las herramientas estándar del entorno gráfico de usuario GUI de FreeCAD.

Object transformation

  • Template:MacroLink/es: Copia el objeto seleccionado varias veces, en una matriz
  • Template:MacroLink/es: Aplana los contornos que no son planos a la mediana de sus coordenadas Z
  • Template:MacroLink/es: Permite encontrar y unir todos los contornos no conectados al contorno no conectado más próximo utilizando una línea
  • Template:MacroLink/es: Elimina toda la paramétrica asociada de un objeto, dejándolo como una forma "muda"
  • Template:MacroLink/es: Fuerza la creación de una polilínea a partir de líneas y arcos que nmo necesariamente se toquen entre si. Utiliza esto si la operación de polilínea habitual falla
  • Template:MacroLink/es: Sometimes arcs are transformed into BSplines, for example when scale operations have been applied to them. This macro recreates valid arcs from them. Useful before exporting to dxf

Printer 3D

  • Macro 3d Printer Slicer: Exports current design to slicer software or CAM software.
  • Macro 3d Printer Slicer Individual Parts: This code, when run, will export the visible bodies at the top level (bodies deeper in the tree will be ignored) of the currently open design to individual STL files, and open them it in the slicing software that you use. This macro will look for Cura as the default but you can change it to any other slider by changing the SLICERAPP variable in the source code.

Raytracing

Spreadsheet Workbench

  • Macro Alias Manager: helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to create, delete, move aliases and create a 'part family' group of files.
  • Macro EasyAlias: Quickly create aliases in FreeCAD Spreadsheet workbench. It uses the labels from one column to create aliases for adjacent cells in the next column to the right, e.g. labels from Column A become aliases for the cells in Column B.
  • Macro Spreadsheet Tools: This macro helps managing cells inside FreeCAD Spreadsheet workbench.
  • Macro FCTreeView: Macro for list all objects in the project in one list without hierarchy, options sort by name, label, visibility, group, by length option search by name, label .... without case sensitive or with case sensitive and select all objects displayed in the macro window.
  • Macro FCSpreadSheet Extract: This macro save the data in a csv file with the formula or in a xml file.

Utility

Wizards

  • Template:MacroLink/es: Muestra un letrero de diálogo preguntando por las dimensiones de tu pieza de la esquina, entonces crea el objeto en el documento y una hoja de dibujo con las vistas planta, alzado y vistas laterales de la pieza

Other interesting macros created by FreeCAD users

  • By microelly2 : freeCAD_macro, geodata, Animation, freecad-nurbs, PieMenu, and more.
  • By hamish2014: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, and more.
  • By triplus: IconThemes, ShortCuts, NavigationIndicator, TabBar, Launcher, PersistentToolbars, PieMenu, and more.
  • By rockn: FreeCAD-Timber, FreeCAD-addons, FreeCAD-library, FreeCAD-StructuresBois, and more.
  • By oddtopus: flamingo (workbench for metal structures).
  • By dprojects: getDimensions FreeCAD macro to get chipboards dimensions to cut (woodworking).
  • By Siardeni: workbench for create metal profiles, square tubing, z profile, palette, rotation, drawing, and more.
  • By realthunder: Assembly3 workbench, and more.

Usage

See how to install macros for a full description, and customize toolbars to add the macros to a toolbar for easy access.

Installing many macros is equivalent to installing a new workbench; see how to install additional workbenches for this information.

Automatic installation

Use the Addon Manager in Tools → Addon manager to install a macro that has been included in the FreeCAD-macros repository. introduced in version 0.17

Manual installation

If the Addon Manager is not used, the macro can be installed manually.

  • Copy the Python code from the corresponding macro page.
  • Open the macros menu Macro → Macros, press Create, and give it a name.
  • Paste the Python code that you copied.
  • Press the Save button, and restart FreeCAD.
  • To use it, open again the macros menu, select your new macro, and press Execute.

Add a macro to a custom toolbar

  • Go to Tools → Customize.
  • In the Macros tab, add a new macro name, and optionally define an icon and a keyboard shortcut.
  • In the Toolbars tab, create a new toolbar, and add your macro, taking it from the Macros category.