Macros recipes/es: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{TutorialInfo/es
|Topic=Macros
|Level=Beginner
|Time=
|Author=
|FCVersion=
|Files=
}}


{|class="fcinfobox wikitable ct" height=100% style="width: 230px; float: right; margin-left: 1em" |
| class="ctTitle" style="font-weight: bold; font-size: 125%;" | [[Image:Text-x-python.png|32px]] Macros
|-
| class="ctToc"|<br/>__TOC__
|}
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Esta página contiene macros para añadir funcionalidad a tu instalación de FreeCAD
Esta página contiene macros para añadir funcionalidad a tu instalación de FreeCAD
Line 16: Line 13:


== Macros ==
== Macros ==

<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">

===[[File:Part_CheckGeometry.svg]] 3D View operations===
===[[File:Part_CheckGeometry.svg]] 3D View operations===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{MacroLink/es|Text-x-python|Macro Rotate View|Macro Rotate View}} Esta macro gira la vista actual 90º hacia la izquierda. Solo funciona si estas en la vista en planta.
* {{MacroLink/es|Text-x-python|Macro Rotate View|Macro Rotate View}} Esta macro gira la vista actual 90º hacia la izquierda. Solo funciona si estas en la vista en planta.
Line 24: Line 25:
* {{MacroLink/es|Text-x-python|Macro Texture Objects|Macro Texture Objects}} Esta macro permite poner temporalmente una imagen de textura en los objetos seleccionados.
* {{MacroLink/es|Text-x-python|Macro Texture Objects|Macro Texture Objects}} Esta macro permite poner temporalmente una imagen de textura en los objetos seleccionados.
</div>
</div>

</div>
</div>
</div>
</div>
Line 29: Line 31:


===[[File:Draft_FlipDimension.svg]] Animation===
===[[File:Draft_FlipDimension.svg]] Animation===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro crank simul|Macro crank simul}}: Rotation rod and piston
* {{MacroLink|Macro Spring|Macro Spring}}: Simulation of one spring
* {{MacroLink|Icon=Macro_crank_simul.png|Macro crank simul|Macro crank simul}}: Rotation rod and piston
* {{MacroLink|Macro hinge|Macro hinge}}: Open and close hinge
* {{MacroLink|Icon=Macro_Spring.png|Macro Spring|Macro Spring}}: Simulation of one spring
* {{MacroLink|Macro Assembly|Macro Assembly}}: Assembly animate
* {{MacroLink|Icon=Macro_hinge.png|Macro hinge|Macro hinge}}: Open and close hinge
* {{MacroLink|Macro Animated Constrain|Macro Animated Constrain}}: Animate angle constrain in sketcher
* {{MacroLink|Icon=Macro_Assembly.png|Macro Assembly|Macro Assembly}}: Assembly animate
* {{MacroLink|Macro Assemblage Imprimante 3D|Macro Assemblage Imprimante 3D}}: Simulation of movements of a 3D printer
* {{MacroLink|Icon=Macro_Animated_Constrain.png|Macro Animated Constrain|Macro Animated Constrain}}: Animate angle constrain in sketcher
* {{MacroLink|Icon=Macro_Assemblage_Imprimante_3D.png|Macro Assemblage Imprimante 3D|Macro Assemblage Imprimante 3D}}: Simulation of movements of a 3D printer
* {{MacroLink|Macro Constraint Draft|Constraint Draft}}: Simple example animation Draft wires by use the Expressions for associate many wires and simulate or verify the movement. Here the circle rotation create the movement for all objects connected (This macro run with FreeCAD version 16)
* {{MacroLink|Icon=Macro_Constraint_Draft.png|Macro Constraint Draft|Constraint Draft}}: Simple example animation Draft wires by use the Expressions for associate many wires and simulate or verify the movement. Here the circle rotation create the movement for all objects connected (This macro run with FreeCAD version 0.16)
* {{MacroLink|Macro Rubik Cube|Macro Rubik Cube}}: Display a Rubik Cube and interactively do slice rotations.

* {{MacroLink|Macro Megaminx|Macro Megaminx}}: Display a Megaminx and interactively do slice rotations.
</div>
</div>
</div>
</div>
Line 45: Line 48:


===[[File:Applications-python.svg]] Code and Scripting===
===[[File:Applications-python.svg]] Code and Scripting===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink/es|Text-x-python|Macro MessageBox|Macro MessageBox}}: muestra como dar información al usuario través de la interfaz gráfica de usuario GUI.
* {{MacroLink/es|Text-x-python|Macro MessageBox|Macro MessageBox}}: muestra como dar información al usuario través de la interfaz gráfica de usuario GUI.


<!--NOT MODIFY THE POSITION OF THIS MACRO THIS MACRO "Macro ZTest Over 128" DO NOT HAVE TO BE TRANSLATED-->
<!--NOT MODIFY THE POSITION OF THIS MACRO THIS MACRO "Macro ZTest Over 128" DO NOT HAVE TO BE TRANSLATED-->
* {{MacroLink|Macro ZTest Over 128|Macro ZTest Over 128}}: This macro is only used by programmers Test characters ASCII over 127.
* {{MacroLink|Icon=Macro_ZTest_Over_128.png|Macro ZTest Over 128|Macro ZTest Over 128}}: This macro is only used by programmers Test characters ASCII over 127.
</div>
</div>
</div>
</div>
Line 56: Line 61:


===[[File:Arch_MeshToShape.svg]] Conversion===
===[[File:Arch_MeshToShape.svg]] Conversion===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{MacroLink/es|Text-x-python|Macro MeshToPart|Macro MeshToPart}}: Convierte las mallas seleccionadas en piezas
* {{MacroLink/es|Text-x-python|Macro MeshToPart|Macro MeshToPart}}: Convierte las mallas seleccionadas en piezas
</div>
</div>

</div>
</div>
</div>
</div>
Line 66: Line 74:


===[[File:Drawing-orthoviews.svg]] Drawing Workbench===
===[[File:Drawing-orthoviews.svg]] Drawing Workbench===

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


<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{MacroLink/es|Text-x-python|Macro Automatic drawing|Macro Automatic drawing}}: 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
* {{MacroLink/es|Text-x-python|Macro Automatic drawing|Macro Automatic drawing}}: 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
* {{MacroLink/es|Text-x-python|Macro CartoucheFC|Macro CartoucheFC}}: 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.
* {{MacroLink/es|Text-x-python|Macro CartoucheFC|Macro CartoucheFC}}: 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.
</div>
</div>

</div>
</div>
</div>
</div>
Line 79: Line 90:


===[[File:Draft_BSpline.svg]] Dxf 2D Draft===
===[[File:Draft_BSpline.svg]] Dxf 2D Draft===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink/es|Text-x-python|Macro Rectellipse|Macro Rectellipse}}: Crea una rectelipse paramétrica
* {{MacroLink/es|Text-x-python|Macro Rectellipse|Macro Rectellipse}}: Crea una rectelipse paramétrica
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Make Circle 3 Points|Macro Make Circle 3 Points}}: 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).
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Make Circle 3 Points|Macro Make Circle 3 Points}}: 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).
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Draft Circle 3 Points|Macro Draft Circle 3 Points}}: se crea un círculo de 3 puntos seleccionados 2D ortogonal.
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Draft Circle 3 Points|Macro Draft Circle 3 Points}}: se crea un círculo de 3 puntos seleccionados 2D ortogonal.
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Draft Circle 3 Points 3D|Macro Draft Circle 3 Points 3D}}: se crea un círculo de 3 puntos seleccionados en el espacio 3D.
* {{MacroLink/es|Macro_Draft_Circle_3_Points|Macro Draft Circle 3 Points 3D|Macro Draft Circle 3 Points 3D}}: se crea un círculo de 3 puntos seleccionados en el espacio 3D.

</div>
</div>
</div>
</div>
Line 90: Line 104:


===[[File:Fem_ResultDisplacement.svg]] Fem===
===[[File:Fem_ResultDisplacement.svg]] Fem===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro GMSH|Macro GMSH}}: Create FEM Meshes by GMSH Mesh Generator
* {{MacroLink|Icon=Macro_GMSH.png|Macro GMSH|Macro GMSH}}: Create FEM Meshes by GMSH Mesh Generator
* {{MacroLink|Icon=Text-x-python.png|Macro_export_transient_FEM_results|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.
</div>
</div>
</div>
</div>
Line 98: Line 115:


===[[File:Part_Measure_Clear_All.svg]] Info and measures===
===[[File:Part_Measure_Clear_All.svg]] Info and measures===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Icon=FCInfo.png|Macro FCInfo|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
* {{MacroLink|Icon=FCInfo.png|Macro FCInfo|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
* {{MacroLink|Icon=FCInfo.png|Macro FCInfo Alternate Linux|Macro FCInfo Alternate Linux}}: same as above, but for Linux
* {{MacroLink|Icon=FCInfo.png|Macro FCInfo Alternate Linux|Macro FCInfo Alternate Linux}}: same as above, but for Linux
* {{MacroLink|Icon=Macro_FCInfoGlass.png|Macro FCInfoGlass|Macro FCInfoGlass}}: Gives a series of information about the selected shape and displayed in screen 3D
* {{MacroLink|Icon=Macro_FCInfoGlass.png|Macro FCInfoGlass|Macro FCInfoGlass}}: Gives a series of information about the selected shape and displayed in screen 3D
* {{MacroLink|Icon=FCInfoToMouse.png|Macro FCInfoToMouse|Macro FCInfoToMouse}}: Provide informations coordinates, length and angles in real time on the mouse in a bubble annotation displayed in the 3D screen
* {{MacroLink|Icon=FCInfoToMouse.png|Macro FCInfoToMouse|Macro FCInfoToMouse}}: Provide informations coordinates, length and angles in real time on the mouse in a bubble annotation displayed in the 3D screen
* {{MacroLink|Macro Delta xyz|Macro Delta xyz}}: Gives the Delta values and the distance between 2 points
* {{MacroLink|Icon=Macro_Delta_xyz.png|Macro Delta xyz|Macro Delta xyz}}: Gives the Delta values and the distance between 2 points
* {{MacroLink|Macro ObjectInfo|Macro ObjectInfo}}: User-friendly "Info" module created by a FreeCAD user
* {{MacroLink|Icon=Macro_ObjectInfo.png|Macro ObjectInfo|Macro ObjectInfo}}: User-friendly "Info" module created by a FreeCAD user
* {{MacroLink|Icon=Macro_Dump_Objects.png|Macro Dump Objects|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.
* {{MacroLink|Icon=Macro_Dump_Objects.png|Macro Dump Objects|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.
* {{MacroLink|Icon=Macro_MeasureCircle.png|Macro MeasureCircle|Macro MeasureCircle}}: Compute the radius of a circle by 3 points or a circular edge.
* {{MacroLink|Icon=Macro_MeasureCircle.png|Macro MeasureCircle|Macro MeasureCircle}}: Compute the radius of a circle by 3 points or a circular edge.
* {{MacroLink|Icon=Macro CenterOfMass.png|Macro CenterOfMass|Macro CenterOfMass}}: Gives the total mass and the center of mass of multiple objects selected with the density chosen.
* {{MacroLink|Icon=Macro CenterOfMass.png|Macro CenterOfMass|Macro CenterOfMass}}: Gives the total mass and the center of mass of multiple objects selected with the density chosen.
* {{MacroLink|Macro SimpleProperties|Macro SimpleProperties}}: Display in a concise way basic physical properties of an object (volume, bound box dimensions, ...)
* {{MacroLink|Icon=Macro_SimpleProperties.png|Macro SimpleProperties|Macro SimpleProperties}}: Display in a concise way basic physical properties of an object (volume, bound box dimensions, ...)

</div>
</div>
</div>
</div>
Line 115: Line 135:


===[[File:Draft_VisGroup.svg]] Libraries===
===[[File:Draft_VisGroup.svg]] Libraries===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro screw maker1_2|Macro screw maker1_2}}: This macro creates a screw with or without thread, according to ISO standards ([http://forum.freecadweb.org/viewtopic.php?f=22&t=6088#p48519 screw_maker1_6.py.zip with Pyside support]). [http://forum.freecadweb.org/viewtopic.php?f=22&t=6558&start=30#p95929 (Screw Maker 2.0 - new version!)]
* {{MacroLink|Icon=Macro_screw_maker1_2.png|Macro screw maker1_2|Macro screw maker1_2}}: This macro creates a screw with or without thread, according to ISO standards ([http://forum.freecadweb.org/viewtopic.php?f=22&t=6088#p48519 screw_maker1_6.py.zip with Pyside support]). [http://forum.freecadweb.org/viewtopic.php?f=22&t=6558&start=30#p95929 (Screw Maker 2.0 - new version!)]
* {{MacroLink|Icon=Macro_BOLTS.png|Macro BOLTS|Macro BOLTS}}: The aim of BOLTS is to build a free and open-source standard parts library for CAD applications.
* {{MacroLink|Icon=Macro_BOLTS.png|Macro BOLTS|Macro BOLTS}}: The aim of BOLTS is to build a free and open-source standard parts library for CAD applications.
* {{MacroLink|Icon=FreeCAD Doc.png|Macro PartsLibrary|Macro PartsLibrary}}: Starts the Parts library browser
* {{MacroLink|Icon=FreeCAD Doc.png|Macro PartsLibrary|Macro PartsLibrary}}: Starts the Parts library browser
Line 125: Line 147:


===[[File:Bound-expression.svg]] Mathematical functions===
===[[File:Bound-expression.svg]] Mathematical functions===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro 3D Parametric Curve|Macro 3D Parametric Curve}}: Draw a function described by parametric equations x(t), y(t) and z(t).
* {{MacroLink|Macro Draw 2D Function|Macro Draw 2D Function}}: draws a function described by an equation z=F(x)
* {{MacroLink|Icon=Macro_3D_Parametric_Curve.png|Macro 3D Parametric Curve|Macro 3D Parametric Curve}}: Draw a function described by parametric equations x(t), y(t) and z(t).
* {{MacroLink|Macro Draw Parametric 2D Function|Macro Draw Parametric 2D Function}}: Based on the above macro, but for parametric and optionally polar
* {{MacroLink|Icon=Macro_Draw_2D_Function.png|Macro Draw 2D Function|Macro Draw 2D Function}}: draws a function described by an equation z=F(x)
* {{MacroLink|Icon=Macro_Draw_Parametric_2D_Function.png|Macro Draw Parametric 2D Function|Macro Draw Parametric 2D Function}}: Based on the above macro, but for parametric and optionally polar
* {{MacroLink|Icon=WF_wf.png|Macro WorkFeatures|Macro WorkFeatures}}: Tool utility : Tab > Wire > Curves And Surfaces {{KEY|Launch Curves and Surfaces Menu ...}}
* {{MacroLink|Icon=WF_wf.png|Macro WorkFeatures|Macro WorkFeatures}}: Tool utility : Tab > Wire > Curves And Surfaces {{KEY|Launch Curves and Surfaces Menu ...}}
equations.
equations.

</div>
</div>
</div>
</div>
Line 137: Line 162:


===[[File:IFC.svg]] Multifunctional===
===[[File:IFC.svg]] Multifunctional===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Icon=WF_wf.png|Macro WorkFeatures|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.
* {{MacroLink|Icon=WF_wf.png|Macro WorkFeatures|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.
</div>
</div>
Line 145: Line 172:


===[[File:Workbench_Image.svg]] Object creation===
===[[File:Workbench_Image.svg]] Object creation===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{MacroLink/es|Macro_makeCube|Macro Make Cube|Macro Make Cube}}: Crea un cubo a partir de 4 puntos
* {{MacroLink/es|Macro_makeCube|Macro Make Cube|Macro Make Cube}}: Crea un cubo a partir de 4 puntos
* {{MacroLink/es|Text-x-python|Macro Solid Sweep|Macro Solid Sweep}}: 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.
* {{MacroLink/es|Text-x-python|Macro Solid Sweep|Macro Solid Sweep}}: 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.
</div>
</div>

</div>
</div>
</div>
</div>
Line 156: Line 186:


===[[File:Workbench_PartDesign.svg]] Object transformation===
===[[File:Workbench_PartDesign.svg]] Object transformation===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink/es|Text-x-python|Macro ArrayCopy|Macro ArrayCopy}}: Copia el objeto seleccionado varias veces, en una matriz
* {{MacroLink/es|Text-x-python|Macro ArrayCopy|Macro ArrayCopy}}: Copia el objeto seleccionado varias veces, en una matriz
* {{MacroLink/es|Text-x-python|Macro FlattenWire|Macro FlattenWire}}: Aplana los contornos que no son planos a la mediana de sus coordenadas Z
* {{MacroLink/es|Text-x-python|Macro FlattenWire|Macro FlattenWire}}: Aplana los contornos que no son planos a la mediana de sus coordenadas Z
Line 163: Line 195:
* {{MacroLink/es|Text-x-python|Macro SuperWire|Macro SuperWire}}: 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
* {{MacroLink/es|Text-x-python|Macro SuperWire|Macro SuperWire}}: 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
* {{MacroLink/es|Text-x-python|Macro HealArcs|Macro HealArcs}}: 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
* {{MacroLink/es|Text-x-python|Macro HealArcs|Macro HealArcs}}: 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

</div>
</div>
</div>
</div>
Line 169: Line 202:


===[[File:View.svg]] Printer 3D===
===[[File:View.svg]] Printer 3D===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro 3d Printer Slicer|Macro 3d Printer Slicer}}: Exports current design to slicer software or CAM software.
* {{MacroLink|Icon=Macro_3d_Printer_Slicer.png|Macro 3d Printer Slicer|Macro 3d Printer Slicer}}: Exports current design to slicer software or CAM software.

</div>
</div>
</div>
</div>
Line 177: Line 213:


===[[File:Preferences-raytracing.svg]] Raytracing===
===[[File:Preferences-raytracing.svg]] Raytracing===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Macro FreeCAD to Kerkythea|Macro FreeCAD to Kerkythea}}: Export from FreeCAD to Kerkythea
* {{MacroLink|Icon=Macro_FreeCAD_to_Kerkythea.png|Macro FreeCAD to Kerkythea|Macro FreeCAD to Kerkythea}}: Export from FreeCAD to Kerkythea

</div>
</div>
</div>
</div>
Line 185: Line 224:


===[[File:Spreadsheet.svg]] Spreadsheet Workbench===
===[[File:Spreadsheet.svg]] Spreadsheet Workbench===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Icon=aliasmanager_icon.png|Macro Alias Manager|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.
* {{MacroLink|Icon=aliasmanager_icon.png|Macro Alias Manager|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.
* {{MacroLink|Macro SpreadsheetTools|Macro Spreadsheet Tools}}: This macro helps managing cells inside FreeCAD Spreadsheet workbench.
* {{MacroLink|Icon=Macro_SpreadsheetTools.png|Macro SpreadsheetTools|Macro Spreadsheet Tools}}: This macro helps managing cells inside FreeCAD Spreadsheet workbench.
* {{MacroLink|Icon=Macro FCTreeView.png|Macro FCTreeView|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.
* {{MacroLink|Icon=Macro FCTreeView.png|Macro FCTreeView|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.
* {{MacroLink|Icon=Macro_FCSpreadsheet_Extract.png|Macro FCSpreadSheet Extract|Macro FCSpreadSheet Extract}}: This macro save the data in a csv file with the formula or in a xml file.
* {{MacroLink|Icon=Macro_FCSpreadsheet_Extract.png|Macro FCSpreadSheet Extract|Macro FCSpreadSheet Extract}}: This macro save the data in a csv file with the formula or in a xml file.

</div>
</div>
</div>
</div>
Line 196: Line 238:


===[[File:Arch_Survey.svg]] Utility===
===[[File:Arch_Survey.svg]] Utility===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* {{MacroLink|Icon=CenterFace.png|Macro CenterFace|Macro CenterFace}}: This macro red trace (editable) the center face (mass) with 1 point and print the coordinates
* {{MacroLink|Icon=CenterFace.png|Macro CenterFace|Macro CenterFace}}: This macro red trace (editable) the center face (mass) with 1 point and print the coordinates
* {{MacroLink|Icon=Macro_Center_Align_Objects_with_Faces_or_Edges.png|Macro Center Align Objects with Faces or Edges|Macro Center Align Objects with Faces or Edges}}: This macro covers the following constraints: - Concentric constraint among non cylindrical parts; - Constraint on center Faces and/or Edges. It works also with the new Body and App::Part containers, as well as with STEP hierarchy.
* {{MacroLink|Icon=Macro_Center_Align_Objects_with_Faces_or_Edges.png|Macro Center Align Objects with Faces or Edges|Macro Center Align Objects with Faces or Edges}}: This macro covers the following constraints: - Concentric constraint among non cylindrical parts; - Constraint on center Faces and/or Edges. It works also with the new Body and App::Part containers, as well as with STEP hierarchy.
* {{MacroLink|Icon=Macro_Easy_Cutouts_for_Enclosures.png|Macro Easy cutouts for Enclosure Design|Macro Easy cutouts for Enclosure Design}}: This macro makes Cutouts for Enclosures in a very handy way
* {{MacroLink|Icon=Macro_Easy_Cutouts_for_Enclosures.png|Macro Easy cutouts for Enclosure Design|Macro Easy cutouts for Enclosure Design}}: This macro makes Cutouts for Enclosures in a very handy way
* {{MacroLink|Macro MacroMenu|Macro MacroMenu}}: Add the macros found in the macros folder to the Macros menu of FreeCAD
* {{MacroLink|Icon=Macro_MacroMenu.png|Macro MacroMenu|Macro MacroMenu}}: Add the macros found in the macros folder to the Macros menu of FreeCAD
* {{MacroLink|Icon=Force_Recompute.png|Macro ForceRecompute|Macro ForceRecompute}}: Forces manual recompute of model
* {{MacroLink|Icon=Force_Recompute.png|Macro ForceRecompute|Macro ForceRecompute}}: Forces manual recompute of model
* {{MacroLink|Macro Recompute Profiler|Macro Recompute Profiler}}: measures time it takes to recompute each object in a project
* {{MacroLink|Icon=Macro_Recompute_Profiler.png|Macro Recompute Profiler|Macro Recompute Profiler}}: measures time it takes to recompute each object in a project
* {{MacroLink|Macro Shake Sketch|Macro Shake Sketch}}: Shake a sketch in order to discover its unconstrained parts.
* {{MacroLink|Icon=Macro_Shake_Sketch.png|Macro Shake Sketch|Macro Shake Sketch}}: Shake a sketch in order to discover its unconstrained parts.
* {{MacroLink|Icon=Replace_Part.png|Macro Replace Part in Assembly|Macro Replace Part in Assembly}}: Replaces a part (simple copy) in an "Assembly" with another Part (simple copy).
* {{MacroLink|Icon=Replace_Part.png|Macro Replace Part in Assembly|Macro Replace Part in Assembly}}: Replaces a part (simple copy) in an "Assembly" with another Part (simple copy).
* {{MacroLink|Icon=Macro_Toggle_Drawstyle.png|Macro Toggle Drawstyle|Macro Toggle Drawstyle}}: This macro toggles the Drawstyle of the selected object
* {{MacroLink|Icon=Macro_Toggle_Drawstyle.png|Macro Toggle Drawstyle|Macro Toggle Drawstyle}}: This macro toggles the Drawstyle of the selected object
* {{MacroLink|Icon=Macro_Toggle_Drawstyle_Optimized.png|Macro Toggle Drawstyle Optimized|Macro Toggle Drawstyle Optimized}}: This macro toggles the Drawstyle of the selected object (same Macro Toggle Drawstyle above optimized all language)
* {{MacroLink|Macro HighlightCommon|Macro HighlightCommon}}: Highlight common parts.
* {{MacroLink|Icon=Macro_HighlightCommon.png|Macro HighlightCommon|Macro HighlightCommon}}: Highlight common parts.
* {{MacroLink|Icon=HighlightDifference.png|Macro HighlightDifference|Macro HighlightDifference}}: Compute the difference between two shapes.
* {{MacroLink|Icon=HighlightDifference.png|Macro HighlightDifference|Macro HighlightDifference}}: Compute the difference between two shapes.
* {{MacroLink|Macro cross section|Macro cross section}}: displays an interactively slidable cross-section.
* {{MacroLink|Icon=Macro_cross_section.png|Macro cross section|Macro cross section}}: displays an interactively slidable cross-section.
* {{MacroLink|Macro Print_SceneGraph|Macro Print_SceneGraph}}: prints the SceneGraph.
* {{MacroLink|Icon=Macro_Print_SceneGraph.png|Macro Print_SceneGraph|Macro Print_SceneGraph}}: prints the SceneGraph.
* {{MacroLink|Icon=BoundBoxTracing.png|Macro BoundingBox Tracing|Macro BoundingBox Tracing}}: This macro red trace (editable) around the BoundingBox with 6 rectangles
* {{MacroLink|Icon=BoundBoxTracing.png|Macro BoundingBox Tracing|Macro BoundingBox Tracing}}: This macro red trace (editable) around the BoundingBox with 6 rectangles
* {{MacroLink|Macro Arch Axis System Repartition|Macro Arch Axis System Repartition}}: This macro help you to create an Arch Axis System along a line with a
* {{MacroLink|Icon=Macro_Arch_Axis_System_Repartition.png|Macro Arch Axis System Repartition|Macro Arch Axis System Repartition}}: This macro help you to create an Arch Axis System along a line with a
* {{MacroLink|Icon=Macro Perpendicular To Wire.png|Macro Perpendicular To Wire|Macro Perpendicular To Wire}}: This macro positioned your object perpendicularly to wire selected.
* {{MacroLink|Icon=Macro Perpendicular To Wire.png|Macro Perpendicular To Wire|Macro Perpendicular To Wire}}: This macro positioned your object perpendicularly to wire selected.
* {{MacroLink|Macro merge duplicate materials|Macro merge duplicate materials}}: Merges materials that have the same base name (with different numeral endings like 001, 002,...) into one.
* {{MacroLink|Icon=Macro_merge_duplicate_materials.png|Macro merge duplicate materials|Macro merge duplicate materials}}: Merges materials that have the same base name (with different numeral endings like 001, 002,...) into one.
* {{MacroLink|Macro Unbind Numpad Shortcuts|Macro Unbind Numpad Shortcuts}}: rebinds standard view commands from digit keys to Ctrl+digit, so that they don't spin the view by accident when entering numbers.
* {{MacroLink|Icon=Macro_Unbind_Numpad_Shortcuts.png|Macro Unbind Numpad Shortcuts|Macro Unbind Numpad Shortcuts}}: rebinds standard view commands from digit keys to Ctrl+digit, so that they don't spin the view by accident when entering numbers.
* {{MacroLink|Macro findConfigFiles|Macro findConfigFiles}}: finds user config files system.cfg and user.cfg, copies folder location to system clipboard, instructs user on renaming these files in order to reset FreeCAD settings, and opens folder with default file browser.
* {{MacroLink|Icon=Macro_findConfigFiles.png|Macro findConfigFiles|Macro findConfigFiles}}: finds user config files system.cfg and user.cfg, copies folder location to system clipboard, instructs user on renaming these files in order to reset FreeCAD settings, and opens folder with default file browser.
* {{MacroLink|Icon=Snip.png|Macro Snip|Macro Snip}}: Easily post screenshots to the FreeCAD forum.
* {{MacroLink|Macro SketchUnmap|Macro SketchUnmap}}: unmap a sketch from its current support and makes its placement absolute, eventually creating a locating datum plane.
* {{MacroLink|Macro PlacementAbsolufy|Macro PlacementAbsolufy}}: reset Part containers to global origin while maintaining objects absolute position.
* {{MacroLink|Icon=SketchUnmap.svg|Macro SketchUnmap|Macro SketchUnmap}}: unmap a sketch from its current support and makes its placement absolute, eventually creating a locating datum plane.
* {{MacroLink|Icon=Macro_PlacementAbsolufy.png|Macro PlacementAbsolufy|Macro PlacementAbsolufy}}: reset Part containers to global origin while maintaining objects absolute position.
* {{MacroLink|Icon=Macro_StraightenObject.png|Macro StraightenObject|Macro StraightenObject}}: re-align object(s) with FreeCAD coordinate system according reference face/edge
* {{MacroLink|Icon=Macro_Visibility_Manager.png|Macro_Visibility_Manager|Macro_Visibility_Manager}}: manage visibility of document objects by type or individually

</div>
</div>
</div>
</div>
Line 224: Line 273:


===[[File:Bulb.svg]] Wizards===
===[[File:Bulb.svg]] Wizards===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{MacroLink/es|Text-x-python|Macro Corner shapes wizard|Macro Corner shapes wizard}}: 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
* {{MacroLink/es|Text-x-python|Macro Corner shapes wizard|Macro Corner shapes wizard}}: 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
</div>
</div>

</div>
</div>
</div>
</div>
Line 234: Line 286:


===[[File:Std_FreeCADWebsite.png|32px]] Other interesting macros created by FreeCAD users===
===[[File:Std_FreeCADWebsite.png|32px]] Other interesting macros created by FreeCAD users===

<div class="mw-collapsible-content">
<div class="mw-collapsible-content">

* [[Image:2364.png|24px]] [https://github.com/microelly2?tab=repositories By microelly2] : freeCAD_macro, geodata, Animation, freecad-nurbs, PieMenu, and more.
* [[Image:2364.png|24px]] [https://github.com/microelly2?tab=repositories By microelly2] : freeCAD_macro, geodata, Animation, freecad-nurbs, PieMenu, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/hamish2014?tab=repositories By hamish2014]: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/hamish2014?tab=repositories By hamish2014]: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, and more.
Line 243: Line 297:
* [[Image:Text-x-python.png|24px]] [https://github.com/Siardeni/FreeCADTools By Siardeni]: workbench for create metal profiles, square tubing, z profile, palette, rotation, drawing, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/Siardeni/FreeCADTools By Siardeni]: workbench for create metal profiles, square tubing, z profile, palette, rotation, drawing, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/realthunder/FreeCAD_assembly3#installation By realthunder]: Assembly3 workbench, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/realthunder/FreeCAD_assembly3#installation By realthunder]: Assembly3 workbench, and more.

</div>
</div>
</div>
</div>



== How to use ==
== How to use ==

Revision as of 11:34, 9 October 2019

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

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 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.

How to use

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

Starting with FreeCAD 0.17, use the Addon Manager in Tools → Addon manager to install a macro that has been included in the FreeCAD-macros repository.

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.