Macros recipes/fr

Cette page répertorie des macros qui peuvent ajouter des fonctionnalités intéressantes à une installation FreeCAD.

Si vous avez écrit une macro et que vous souhaitez l'inclure dans l'une des catégories de cette page, rendez-vous sur Documentation pour les macros pour en savoir plus sur la façon de documenter correctement une macro.

Part_CheckGeometry.svg Opérations dans la vue 3D

 * : Cette macro aligne la vue courante sur une face sélectionnée.


 * : Cette macro aligne la vue courante sur une face sélectionnée.


 * : Copie le contenu de la vue 3D redimensionnée à 640, 480 px dans le presse-papiers.


 * : Cette macro peut faire pivoter l'écran dans un angle défini et sur l'axe défini et crée un plan pour faire face à l'écran afin de créer un formulaire dans le plan spécifié positionne la face sélectionnée face à l'écran, pour détecter la position de la caméra.


 * : Cette petite macro transforme la flèche de la souris en une croix de précision.


 * : Cette macro fait pivoter la vue en cours de 90° vers la gauche. Ne fonctionne que si vous êtes dans [[Image:View-top.svg|Std_ViewTop|16px|link=Std_ViewTop/fr]] XY (haut).


 * : Cette macro est utilisée dans la console Python et fait tourner la vue en cours dans l'angle et le plan donnés.


 * : Cette macro fait pivoter la vue actuelle en vue axonométrique.


 * : Cette macro permet de sauvegarder la vue 3D dans le format souhaité. La vue 3D ou la fenêtre 3D complète de FreeCAD prend les dimensions souhaitées.


 * : Publiez facilement des captures d'écran sur le forum FreeCAD.


 * : Fournit une interface graphique pour permettre la rotation de la vue par des valeurs précises dans les trois directions.


 * : Zoom 1:1 pour que les objets apparaissent à leur taille réelle sur l'écran.

Draft_FlipDimension.svg Animation

 * : Animer la contrainte d'angle dans sketcher.


 * : Animez votre modèle en animant ses propriétés avec cette fonction en Python


 * : Simulation des mouvements d'une imprimante 3D.


 * : Animation de l'assemblage.


 * : Exemple simple d'animation Draft des polylignes en utilisant les expressions pour associer plusieurs polylignes et simuler ou vérifier le mouvement. Ici la rotation du cercle crée le mouvement pour tous les objets connectés (Cette macro fonctionne avec FreeCAD version 0.16).


 * : Tige de rotation et piston.


 * : Charnière ouverte et fermée.


 * : Simulation d'un ressort.

Applications-python.svg Code et Script

 * : Cette macro fournit un utilitaire pour assembler un projet à partir de fichiers de sous-projets en utilisant la fonction Fusionner le projet.


 * : Crée une copie de chaque objet sélectionné et définit ses propriétés à une expression reliée à l'objet original, ce qui en fait un clone explicite et modifiable.


 * : Étend les capacités de l'éditeur Python intégré de FreeCAD.


 * : Cette macro facilite la sélection des variables globales par l'utilisateur et le contrôle de leurs valeurs.


 * : Montre comment donner des informations à l'utilisateur via l'interface graphique.


 * : Imprime le Graphe de scène.


 * : Cette macro fournit un espace de travail couper/copier/coller pour le code Python, il est segmenté de sorte que différentes sections peuvent être sélectionnées et il est persistant entre les sessions FreeCAD.


 * : This macro is only used by programmers Test characters ASCII over 127.


 * : Exemple d'utilisation des commandes Qt, de leurs connexions, de l'extraction et de l'affectation des données.


 * [[Image:Text-x-python.png|24px]] scanObjects : Outil d'inspection pour le développement de macros FreeCAD et le débogage de projets.

Arch_MeshToShape.svg Conversion

 * : Importe un fichier 3DXML-ascii dans FreeCAD, fonctionnalité limitée.


 * : Jeu de commandes de Draft dans une petite macro pour l'exemple d'esquisse 2D : travailler avec les fichiers DXF.


 * : Cette macro crée une face à partir d'un fichier DXF, les "couches" sont reconnues séparément et formées en groupes.


 * : Créer un composé à partir d'une pièce avec une copie de toutes ses formes.


 * : Cette macro convertit les éléments sélectionnés d'un fichier DXF importé en face et en esquisse.


 * : Macro utility for create unique wire with many wires, the type wire created is selected to MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, Bezier curve.


 * : Extracts boundary wires from selected meshes.


 * : Converts the selected Face to a single Sketch without constraints.


 * : Import Black and White BMP images into FreeCAD as sketch, wire, or solid or Grayscale BMP for lithophanes.


 * : This macro create boolean operation with the objects selected just select the wires give the thickness and click "Create".


 * : Imports an iges file with entity 128, for example an iges-file from FreeShip, into FreeCAD.


 * : Converts selected meshes to parts.


 * : MultiCopy allows the duplication (copy and paste) of multiple FreeCAD objects that can be labelled sequentially and in a custom manner.


 * : Converts selected parts to VRML meshes for small size and faster loading (VRML models Kicad and Blender compatible).

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

 * : This macro aligns the camera to the current Draft Working Plane.


 * : This macro moves the current Draft Working Plane to the center of the current view.


 * : Creates a circle from 3 selected points 2D orthogonal.


 * : Creates a circle from 3 selected points in the space 3D.


 * : Converts the selected Edges to a circular Arc if possible. Useful for restoring discretized arcs.


 * : Makes an ellipse by selecting three points (in this order): center, major radius and minor radius.


 * : This macro convert the object line, wire in line Dash, DashDot, DashDotDot, ZigZag and Hand with the dimensions given.


 * : Creates a arc from 3 selected points.


 * : Creates a circle on 3 selected points, the points can be objects (this example brings together the two examples below, all parameters simply settle on a graphic window).


 * : Creates a parametric rectellipse.

[[File:Drawing-orthoviews.svg]] Atelier de dessin
L'atelier Drawing est considéré comme obsolète depuis FreeCAD 0.17. Pensez à utiliser l'atelier TechDraw à la place.


 * : Allows the user to get the view of his object in a drawing with 4 different position (front,top,iso,right). Needs some modification to be perfectly effective.


 * : This GUI macro to fill simply all fields of the cartridge of the plan implementation worksheet FreeCAD, the format of the date and the symbol of the projection mode adapt to the EU region or US selected.


 * : This GUI macro to fill simply all fields of the cartridge model 2 of the plan implementation worksheet FreeCAD.


 * : This GUI macro to fill simply all fields of the cartridge templates_Full of the plan implementation worksheet FreeCAD, the format of the date and the symbol of the projection mode adapt to the EU region or US selected.


 * : Get the normal vector of a preselected face for creating a drawing view normal to that face.

[[File:Fem_ResultDisplacement.svg]] FEM

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


 * : Create FEM Meshes by GMSH Mesh Generator.

Std_Windows.svg Gui

 * : This macro resets the position of the toolbars.


 * : Add the macros found in the macros folder to the Macros menu of FreeCAD.


 * : Temporarily split the property editor from the combo view to a separated dock widget.


 * : This macro toggles the visibility of various supporting panels in FreeCAD, allowing the main window to be viewed with all available screen space.

[[File:Part_Measure_Clear_All.svg]] Info et mesures

 * : This macro red trace (editable) around the BoundingBox with 6 rectangles.


 * : This macro red trace (editable) the center face (mass) with 1 point and print the coordinates.


 * : Gives the total mass and the center of mass of multiple objects selected with the density chosen.


 * : Displays an interactively slidable cross-section.


 * : Gives the Delta values and the distance between 2 points.


 * : This macro generates a listing of all objects in the current document - the list can be in a window or on the Report view.


 * : This macro display all elements below cursor same "Macro Mouse over cb" with GUI (elements covered by other elements will also be displayed).


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


 * : Same as above, but for Linux (obsolete).


 * : Gives a series of information about the selected shape as FCInfo in a mini ToolBar.


 * : Gives a series of information about the selected shape and displayed in screen 3D.


 * : Provide informations coordinates, length and angles in real time on the mouse in a bubble annotation displayed in the 3D screen.


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


 * : Highlight common parts.


 * : Compute the difference between two shapes.


 * : Compute the radius of a circle by 3 points or a circular edge.


 * : This macro display all elements below cursor (elements covered by other elements will also be displayed).


 * : User-friendly "Info" module created by a FreeCAD user.


 * : Display in a concise way basic physical properties of an object (volume, bound box dimensions, ...).

[[File:Draft_VisGroup.svg]] Bibliothèques

 * : The aim of BOLTS is to build a free and open-source standard parts library for CAD applications.


 * : Starts the Parts library browser.


 * : This macro creates a screw with or without thread, according to ISO standards (screw_maker1_6.py.zip with Pyside support). (Screw Maker 2.0 - new version!)

[[File:Bound-expression.svg]] Fonctions mathématiques

 * : Draw a function described by parametric equations x(t), y(t) and z(t).


 * : Draws a function described by an equation z=F(x).


 * : Based on the above macro, but for parametric and optionally polar.


 * : Feature python update of Macro 3D Parametric Curve.

[[File:Workbench_Image.svg]] Création d'objets

 * : AeroFoil creates airfoil curves and faces using pre-defined models, algebraic functions, and DAT or CSV Files.


 * : Imports and scales a .dat airfoil to desired chord length.


 * : A GUI dialog that creates an Apothem, (inradius) Based Prism from user input.


 * : Create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point) on choice (same above without GUI).


 * : Create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point) on choice (same below but with GUI) plus create sector and face.


 * : Cut a circle or arc and create x arcs, giving the number of cut.


 * : Cut a line and create x points, giving the number of points, create line or not, create points or not, create bicolor or not on choice.


 * : Creates grooved cylinder for cam.


 * : This macro create a text around a cylinder.


 * : Creates parametric honeycomb grid.


 * : This macro create one spring truncate, the troncature is adjustable on the all coil to choice.


 * : This macro create one spring (helix) on the surface of the object (solide).


 * : Create a loft with a list of wire (specially created for Macro Texture).


 * : This macro creates a geodesic dome shell.


 * : Guitar Fretboard Maker.


 * : Guitar Nut Maker.


 * : Creates an Hilbert curve wire in 2 or 3 dimensions with many iterations.


 * : Creates a feature python Honeycomb object compatible in and out of PartDesign.


 * : Airfoil coordinates import, then scale the airfoil, rotate, translate in the plane, translate along the span, select the plane and the main axis, and turn the geometry into a sketch.


 * : Finds the intersection between 2 or 3 selected edges/faces, works with Datum Planes and Datum Lines also. Creates a parametric feature python object containing the shape of the intersection.


 * : Create a line giving coordinate XYZ length and angle to plane X Y.


 * : Creates a rectangular cuboid from 4 points.


 * : This macro creates parametric polyhedrons (dodecahedron, icosahedron, tetrahedron, ...). Customizable via radius or side.


 * : This macro creates a parametric pyramid. All parameters are customizable just like with Part Cone.


 * : This macro reproduce all element selected subobject wire or face.


 * : Creates an Arch Site from a series of contour lines.


 * : Creates a solid by sweeping a 2D profile along a trajectory previously selected in the 3D view. The 2D elements can be created through the regular tools in FreeCAD's GUI.


 * : This macro create one triangle creates a triangle by giving the head angle and the height of the triangle (the triangle of the head is positioned to the xyz coordinates 0.0).


 * : This macro creates a Wire with the coordinates extracted from a file. The coordinates X Y Z are separated by a space.

[[File:Workbench_PartDesign.svg]] Transformation d'objets

 * : This macro align the selected object to the current View and set the coordinates Placement of the camera.


 * : Copies the selected object several times, on an array grid.


 * : Bevels selected vertices, creates parametric feature python object, compatible with all solids (except with round edges) including features in Part Design bodies.


 * : This macro covers the following constraints: Concentric constraint among non cylindrical parts; and Constraint on center Faces and/or Edges. It works also with the new Body and App::Part containers, as well as with STEP hierarchy.


 * : Creates a clone of the object and the converted in the chosen position and size (inch, mm, m, µm...). The base object is recognized in mm (FreeCAd base).


 * : This macro easily creates a connection between two objects, an object and a point or between two points or the selected line, wire, edge (the center of the objects are the starting and ending points of the sweep) can be selected form a configurable ellipse polygon circle.


 * : Flattens draft wires that are not planar to their median Z coordinate.


 * : Flattens draft wires that are not planar to a plane defined by 3 points.


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


 * : Macro for easy scaling drawings, graphics, diagram, blueprint and similar 2D images in Image workbench.


 * : Allows to find and joint all non connected edge to the closest non connected one using a line.


 * : Apply linear space transformations to distort shapes. E.g., non-uniform scaling, shearing, mirroring, axes swapping.


 * : This macro translates the Placement of an object so that a selected location becomes its new origin.


 * : Boolean operation. Similar to Part Common, but with custom overlap count threshold (parametric).


 * : Macro that provides parametric defeaturing inside and outside the PartDesign Workbench.


 * : This macro positions an object perpendicularl to a selected wire.


 * : Reset Part containers to global origin while maintaining objects absolute position.


 * : Removes all parametric associativity from an object, leaving it as a "dumb" shape.


 * : Macro to rotate an object around the center of its boundbox, its center of mass, or the last clicked point.


 * : Alternative implementation of Part Section tool, more suitable for making sweep paths (parametric).


 * : Re-align object(s) with FreeCAD coordinate system according reference face/edge.


 * : Forces the creation of a Wire from lines and arcs that don't necessarily touch each other. Use this if normal wire operation fails.


 * : Filter wires from a sketch to only use certain ones, also 2D offsets, scales, rearranges wire order.

Part_FaceColors.svg Object visibility, view properties and textures

 * [[Image:Text-x-python.png|24px]] colorManager: Allows to set face colors for all objects from a spreadsheet. Also you can browse colors for a manually selected face or object and see the effect in the 3D model in real-time.


 * : Easily set colors of faces, edges, and vertices, including individual transparency levels.


 * : This macro check hidden all object in the document (Visibility=False).


 * : Create a project from a bmp image to create a texture easily.


 * : This macro allows you to temporarily put a texture image on the selected objects.


 * : This macro toggles the Drawstyle of the selected object.


 * : This macro toggles the Drawstyle of the selected object (same as Macro Toggle Drawstyle above but optimized for all languages).


 * : Set of three macro, macro 1: hidden the objects not selected, macro 2: displayed alls objects, macro 3: hidden alls objects.


 * : Set of two macro, macro 1:Macro_Toggle_Visibility2_1-2 hidden the objects not selected, macro 2:Macro_Toggle_Visibility2_2-2 displayed alls objects, macro with the original visibility.


 * : Set of two macro, macro 1:Macro_Toggle_Visibility2_1-2 hidden the objects not selected, macro 2:Macro_Toggle_Visibility2_2-2 displayed alls objects, macro with the original visibility.


 * : This macro check visible all object in the document (Visibility=True).


 * : Manage visibility of document objects by type or individually.


 * [[Image:Text-x-python.png|24px]] setTextures: Allows to permanently store the URL of textures in a FreeCAD project and load stored textures.

[[File:Workbench_PartDesign.svg]] Atelier PartDesign

 * : Encapsule les solides non-PartDesign pour les utiliser dans les corps PartDesign, et plus encore.

[[File:View.svg]] Imprimante 3D

 * : Exports current design to slicer software or CAM software.


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

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

 * : Exporte un fichier FreeCAD compatible avec Kerkythea.

[[File:Spreadsheet.svg]] Atelier feuille de calcul

 * : Helps managing aliases inside FreeCAD Spreadsheet workbench. It is able to create, delete, move aliases and create a 'part family' group of files.


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


 * : This macro save the data in a csv file with the formula or in a xml file.


 * : This macro helps managing cells inside FreeCAD Spreadsheet workbench.


 * : Exports a spreadsheet as styled html. Intended as support in transfering data to office suits.


 * [[Image:Text-x-python.png|24px]] sheet2export: Allows to export FreeCAD spreadsheet to file formats (.md, .html, .csv, .json).

[[File:Arch_Survey.svg]] Utilitaires

 * : This macro help you to create an Arch Axis System along a line with a set of parameters.


 * : This macro testing if one selection are duplicate, select the object IN THE 3D VIEW the "ForbiddenCursor" stay if the or one selection is duplicate, the macro stay resident.


 * : This macro makes Cutouts for Enclosures in a very handy way.


 * : This macro expand selected items in the tree view. If not selection all item are expand/collapse.


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


 * : Forces manual recompute of model.


 * : All object not selected are deleted!


 * : Shows a list of US Imperial Arch scales list with the corresponding factor to apply to TechDraw pages or views.


 * : Merges materials that have the same base name (with different numeral endings like 001, 002,...) into one.


 * : Ping users on the forum with ease.


 * : Measures time it takes to recompute each object in a project.


 * : Replaces a part (simple copy) in an "Assembly" with another Part (simple copy).


 * : This macro select a choice Face, Edge, Vertex hovering by the mouse.


 * : All visible objects in the tree will be selected.


 * : Shake a sketch in order to discover its unconstrained parts.


 * : Unmap a sketch from its current support and makes its placement absolute, eventually creating a locating datum plane.


 * : Prints model tree as "ASCII art" with custom pattern & style, and export to clipboard, file or embedded document.


 * : Rebinds standard view commands from digit keys to Ctrl+digit, so that they don't spin the view by accident when entering numbers.


 * : Tool utility to create points, axes, planes and many other useful features to facilitate the creation of your project.

[[File:Bulb.svg]] Wizards

 * : Pops up a dialog asking for the dimensions of your corner piece, then creates the object in the document and creates a page view with top, front and lateral views of the piece.


 * : Additional Workbench to create different types of gears, involute gear, involute rack, cycloide gear, bevel gear.


 * : This little macro is dedicate to users of Windows 10. The explorer fonts for use the ShapeString is empty and this little macro can help you see aesily the font to use.


 * : Macro for automatic drawing generation with 3 normal projections and one isometric.


 * : Macro for automatic 2D views generation with 6 normal projections and one isometric.


 * : Allows the user to create a Geneva wheel mechanism from scratch. Must edit values within the Macro to alter the size of the object.


 * : A GUI front end that allows the user to create a Geneva wheel mechanism from scratch.


 * : Creates a half turn (left/right) stair from a Data-file.


 * : This macro generates both three dimensional half-hull and full-hull models from a series of 2D line drawings.


 * : Display a Megaminx and interactively do slice rotations.


 * : This little macro create one Property additional (memo or other text) for you object (only Draft).


 * : Display a Rubik Cube and interactively do slice rotations.


 * : Creates an unfolded part from a sheet-metal-part.


 * : Create stair helix, create your stair nosing select and run the macro.


 * : Allows to unfold the surfaces of a box of any shape and to draw them on a page.


 * : Allows to unroll ruled surfaces and to draw them on a page.

Std_FreeCADWebsite.svg Travail du bois

 * [[Image:Text-x-python.png|24px]] getDimensions: FreeCAD macro to get chipboards dimensions to cut (BOM, cutlist).


 * : Creates side and top/bottom walls for a cabinet with drilled holes for connection parts of manufacturer Hettich.


 * : Creates a variety of joints, such as mortise/tenon, box joints, dovetail joints, and snap joints.


 * [[Image:Text-x-python.png|24px]] makeTransparent: Switches all parts from non-transparent to transparent, and back, allowing you to preview pilot holes, countersinks and other joints.

Std_FreeCADWebsite.svg Autres macros intéressantes créées par des utilisateurs

 * [[Image:Text-x-python.png|24px]] By hamish2014: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, and more.


 * [[Image:2364.png|24px]] By microelly2 : FreeCAD_macro, geodata, Animation, freecad-nurbs, PieMenu, and more.


 * [[Image:Text-x-python.png|24px]] By oddtopus: Flamingo (workbench for metal structures).


 * [[Image:Text-x-python.png|24px]] By realthunder: Assembly3 Workbench, and more.


 * [[Image:681.jpg|24px]] By rockn: FreeCAD-Timber, FreeCAD-addons, FreeCAD-library, FreeCAD-StructuresBois, and more.


 * [[Image:Text-x-python.png|24px]] By Siardeni: Workbench for create metal profiles, square tubing, z profile, palette, rotation, drawing, and more.


 * [[Image:Text-x-python.png|24px]] By triplus: IconThemes, ShortCuts, NavigationIndicator, TabBar, Launcher, PersistentToolbars, PieMenu, and more.

Comment les installer?
Voir Comment installer une Macro pour une description complète et Personnaliser la barre d'outils pour ajouter les macros à votre barre de tâche pour un accès facilité.

L'installation de nombreuses macros équivaut à l'installation de nouveaux ateliers. Voir Comment installer un atelier supplémentaire.

Installation automatique
Utilisez le Gestionnaire d'Addon dans  pour installer une macro présente dans le dépôt FreeCAD-macros.

Installation manuelle
Si le Gestionnaire d'Addon n'est pas utilisé, la macro peut être installée manuellement.
 * Copiez le code Python de la page de la macro correspondante.
 * Ouvrez le menu Macro puis appuyez sur le  et donnez-lui un nom.
 * Collez le code Python que vous avez copié.
 * Appuyez sur le bouton et redémarrez FreeCAD.
 * Pour l'utiliser, ouvrez à nouveau le menu Macro, sélectionnez votre nouvelle macro et appuyez sur.

Ajouter votre nouvelle macro à une barre d'outils personnalisée

 * Faites
 * Dans l'onglet, ajoutez une nouvelle macro et définissez si vous le désirez un icône et un raccourci-clavier.
 * Dans l'onglet, créez une nouvelle barre d'outils, puis ajoutez votre macro, en la copiant dans la catégorie.