Macros recipes/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "(S uživatelskou ikonou)")
(Updating to match new version of source page)
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
{{TutorialInfo/cs

|Topic=Macros
{|class="fcinfobox wikitable ct" height=100% style="width: 230px; float: right; margin-left: 1em" |
|Level=Beginner
| class="ctTitle" style="font-weight: bold; font-size: 125%;" | [[Image:Text-x-python.png|32px]] Macros
|Time=
|-
|Author=
| class="ctToc"|<br/>__TOC__
|FCVersion=
|}
|Files=
<div class="mw-translate-fuzzy">
}}
Tato stránka obsahuje makra pro rozšíření funkcionality Vaší instalace FreeCADu.
Tato stránka obsahuje makra pro rozšíření funkcionality Vaší instalace FreeCADu.
</div>

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


== Makra ==
== Makra ==

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

===[[File:Part_CheckGeometry.svg]] Operace s 3D pohledy===
===[[File:Part_CheckGeometry.svg]] Operace s 3D pohledy===

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

<div class="mw-translate-fuzzy">
* {{MacroLink/cs|Text-x-python|Macro Rotate View|Macro Rotate View}} toto makro otáčí aktuální pohled o 90° doleva. Funguje pouze u pohledu shora.
* {{MacroLink/cs|Text-x-python|Macro Rotate View|Macro Rotate View}} toto makro otáčí aktuální pohled o 90° doleva. Funguje pouze u pohledu shora.
* {{MacroLink/cs|Text-x-python|Macro View Rotation|Macro View Rotation}} poskytuje GUI pro povolení otáčení pohledu o přesnou velikost ve všech třech směrech.
* {{MacroLink/cs|Text-x-python|Macro View Rotation|Macro View Rotation}} poskytuje GUI pro povolení otáčení pohledu o přesnou velikost ve všech třech směrech.
* {{MacroLink/cs|Text-x-python|Macro Texture Objects|Macro Texture Objects}} toto makro umožňuje vložit dočasně texturu do vybraných objektů.
* {{MacroLink/cs|Text-x-python|Macro Texture Objects|Macro Texture Objects}} toto makro umožňuje vložit dočasně texturu do vybraných objektů.
* {{MacroLink/cs|Text-x-python|Macro Mouse Cross|Macro Mouse Cross}} toto malé makro mění šipku kurzoru myši na jemný křížek.
* {{MacroLink/cs|Text-x-python|Macro Mouse Cross|Macro Mouse Cross}} toto malé makro mění šipku kurzoru myši na jemný křížek.
</div>
</div>
</div>


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

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

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

* {{MacroLink|Text-x-python|Macro crank simul|Macro crank simul}}: Rotation rod and piston
* {{MacroLink|Text-x-python|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|Text-x-python|Macro hinge|Macro hinge}}: Open and close hinge
* {{MacroLink|Icon=Macro_Spring.png|Macro Spring|Macro Spring}}: Simulation of one spring
* {{MacroLink|Text-x-python|Macro Assembly|Macro Assembly}}: Assembly animate
* {{MacroLink|Icon=Macro_hinge.png|Macro hinge|Macro hinge}}: Open and close hinge
* {{MacroLink|Text-x-python|Macro Animated Constrain|Macro Animated Constrain}}: Animate angle constrain in sketcher
* {{MacroLink|Icon=Macro_Assembly.png|Macro Assembly|Macro Assembly}}: Assembly animate
* {{MacroLink|Text-x-python|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|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)

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


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

===[[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/cs|Text-x-python|Macro MessageBox|Macro MessageBox}}: ukazuje jak poskytnout uživateli informace pomocí GUI.
* {{MacroLink/cs|Text-x-python|Macro MessageBox|Macro MessageBox}}: ukazuje jak poskytnout uživateli informace pomocí GUI.

<!--NOT MODIFY THE POSITION OF THIS MACRO THIS MACRO "Macro ZTest Over 128" DO NOT HAVE TO BE TRANSLATED-->
* {{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>


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

===[[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">
* {{MacroLink/cs|Text-x-python|Macro MeshToPart|Macro MeshToPart}}: konvertuje vybrané sítě do dílů
* {{MacroLink/cs|Text-x-python|Macro MeshToPart|Macro MeshToPart}}: konvertuje vybrané sítě do dílů
* {{MacroLink/cs|Text-x-python|Macro FaceToSketch|Macro FaceToSketch}}: Konvertuje vybraný povrch do jednoho náčrtu bez vazeb.
* {{MacroLink/cs|Text-x-python|Macro FaceToSketch|Macro FaceToSketch}}: Konvertuje vybraný povrch do jednoho náčrtu bez vazeb.
</div>

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


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

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

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

<div class="mw-translate-fuzzy">
* {{MacroLink/cs|Text-x-python|Macro Automatic drawing|Macro Automatic drawing}}: umožňuje uživateli získat pohled na objekt ve výkresu ve 4 různých pozicích (zepředu, shora, iso a zprava). Aby bylo dokonale efektivní, potřebuje ještě pár úprav.
* {{MacroLink/cs|Text-x-python|Macro Automatic drawing|Macro Automatic drawing}}: umožňuje uživateli získat pohled na objekt ve výkresu ve 4 různých pozicích (zepředu, shora, iso a zprava). Aby bylo dokonale efektivní, potřebuje ještě pár úprav.
</div>

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


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

===[[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/cs|Text-x-python|Macro Rectellipse|Macro Rectellipse}}: vytváří parametrický elipsový obdélník
* {{MacroLink/cs|Text-x-python|Macro Rectellipse|Macro Rectellipse}}: vytváří parametrický elipsový obdélník
* {{MacroLink/cs|Macro_Draft_Circle_3_Points|Macro Make Circle 3 Points|Macro Make Circle 3 Points}}: vytváří kružnici podle 3 vybraných bodů, body mohou být objekty (tento příklad spojuje dva následující příklady, všechny parametry jsou uspořádány v grafickém okně).
* {{MacroLink/cs|Macro_Draft_Circle_3_Points|Macro Make Circle 3 Points|Macro Make Circle 3 Points}}: vytváří kružnici podle 3 vybraných bodů, body mohou být objekty (tento příklad spojuje dva následující příklady, všechny parametry jsou uspořádány v grafickém okně).
Line 62: Line 99:
* {{MacroLink/cs|Macro_Draft_Circle_3_Points|Macro_Draft_Circle_3_Points_3D|Macro_Draft_Circle_3_Points_3D}}: vytváří kružnici podle 3 vybraných bodů ve 3D prostoru
* {{MacroLink/cs|Macro_Draft_Circle_3_Points|Macro_Draft_Circle_3_Points_3D|Macro_Draft_Circle_3_Points_3D}}: vytváří kružnici podle 3 vybraných bodů ve 3D prostoru
* {{MacroLink/cs|Text-x-python|Macro EdgesToArc|Macro EdgesToArc}}: Pokud je to možné, konvertuje vybrané hrany do kružnicového oblouku. Užitečné pro obnovení rozlámaného oblouku.
* {{MacroLink/cs|Text-x-python|Macro EdgesToArc|Macro EdgesToArc}}: Pokud je to možné, konvertuje vybrané hrany do kružnicového oblouku. Užitečné pro obnovení rozlámaného oblouku.

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


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

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

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

* {{MacroLink|Text-x-python|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>


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

===[[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">

<div class="mw-translate-fuzzy">
* {{MacroLink/cs|FCInfo|Macro FCInfo|Macro FCInfo}}: dodá řadu informací o vybraném tvaru a může zobrazovat konverzi délky, sklonu (stupně, radiány) tvaru, povrch, objem a váhu tvaru v mezinárodních i anglosaských jednotkách.
* {{MacroLink/cs|FCInfo|Macro FCInfo|Macro FCInfo}}: dodá řadu informací o vybraném tvaru a může zobrazovat konverzi délky, sklonu (stupně, radiány) tvaru, povrch, objem a váhu tvaru v mezinárodních i anglosaských jednotkách.
* {{MacroLink/cs|Text-x-python|Macro Delta xyz|Macro Delta xyz}}: dodá hodnotu Delta (úhel) a vzdálenost mezi 2 body.
* {{MacroLink/cs|Text-x-python|Macro Delta xyz|Macro Delta xyz}}: dodá hodnotu Delta (úhel) a vzdálenost mezi 2 body.
</div>

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


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

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

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

* {{MacroLink/cs|Text-x-python|Macro screw_maker1_2|Macro screw_maker1_2}}: toto makro vytváří šroub s nebo bez závitu podle ISO standardů.
* {{MacroLink/cs|Text-x-python|Macro screw_maker1_2|Macro screw_maker1_2}}: toto makro vytváří šroub s nebo bez závitu podle ISO standardů.
* {{MacroLink/cs|Macro_BOLTS|Macro BOLTS|Macro BOLTS}}: cílem BOLTSu je vybudovat bezplatnou open-source knihovnu standardních dílů pro CAD aplikace.
* {{MacroLink/cs|Macro_BOLTS|Macro BOLTS|Macro BOLTS}}: cílem BOLTSu je vybudovat bezplatnou open-source knihovnu standardních dílů pro CAD aplikace.
Line 89: Line 140:


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

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

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

* {{MacroLink|Text-x-python|Macro 3D Parametric Curve|Macro 3D Parametric Curve}}: Draw a function described by parametric equations x(t), y(t) and z(t).
* {{MacroLink|Text-x-python|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|Text-x-python|Macro Draw Parametric 2D Function|Macro Draw Parametric 2D Function}}: Based on the above macro, but for parametric and optionally polar equations.
* {{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 ...}}
equations.

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


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

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

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

* {{MacroLink|WF_wf|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>
</div>
</div>


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

===[[File:Workbench_Image.svg]] Vytvoření objektu===
===[[File:Workbench_Image.svg]] Vytvoření objektu===

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

<div class="mw-translate-fuzzy">
* {{MacroLink/cs|Macro_makeCube|Macro makeCube|Macro makeCube}} : vytváří kostku ze 4 bodů
* {{MacroLink/cs|Macro_makeCube|Macro makeCube|Macro makeCube}} : vytváří kostku ze 4 bodů
* {{MacroLink/cs|Text-x-python|Macro Solid Sweep|Macro Solid Sweep}}: vytváří těleso tažením 2D profilu po trajektorii předem vybrané ve 3D pohledu. 2D prvek může být vytvořen standardními nástroji GUI FreeCADu.
* {{MacroLink/cs|Text-x-python|Macro Solid Sweep|Macro Solid Sweep}}: vytváří těleso tažením 2D profilu po trajektorii předem vybrané ve 3D pohledu. 2D prvek může být vytvořen standardními nástroji GUI FreeCADu.
</div>

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


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

===[[File:Workbench_PartDesign.svg]] Transformace objektu===
===[[File:Workbench_PartDesign.svg]] Transformace objektu===

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

* {{MacroLink/cs|Text-x-python|Macro ArrayCopy|Macro ArrayCopy}}: několikrát zkopíruje objekt do mřížkového pole
* {{MacroLink/cs|Text-x-python|Macro ArrayCopy|Macro ArrayCopy}}: několikrát zkopíruje objekt do mřížkového pole
* {{MacroLink/cs|Text-x-python|Macro FlattenWire|Macro FlattenWire}}: srovná nakreslené dráty (lomené čáry), které nejsou v jedné rovině, do jejich střední souřadnice Z
* {{MacroLink/cs|Text-x-python|Macro FlattenWire|Macro FlattenWire}}: srovná nakreslené dráty (lomené čáry), které nejsou v jedné rovině, do jejich střední souřadnice Z
Line 121: Line 190:
* {{MacroLink/cs|Text-x-python|Macro SuperWire|Macro SuperWire}}: dodělá vytvoření drátu z přímek a oblouků, které se nemusejí vzájemně dotýkat. Použijte tehdy, pokud normální funkce selže.
* {{MacroLink/cs|Text-x-python|Macro SuperWire|Macro SuperWire}}: dodělá vytvoření drátu z přímek a oblouků, které se nemusejí vzájemně dotýkat. Použijte tehdy, pokud normální funkce selže.
* {{MacroLink/cs|Text-x-python|Macro HealArcs|Macro HealArcs}}: Oblouky jsou někdy transformovány do B-křivek, například, když se změní měřítko. Toto makro z toho znovuvytvoří platný oblouk. Je to užitečné před exportem do dxf.
* {{MacroLink/cs|Text-x-python|Macro HealArcs|Macro HealArcs}}: Oblouky jsou někdy transformovány do B-křivek, například, když se změní měřítko. Toto makro z toho znovuvytvoří platný oblouk. Je to užitečné před exportem do dxf.

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


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

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

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

* {{MacroLink|Text-x-python|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>


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

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

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

* {{MacroLink|Text-x-python|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>


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

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

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

* {{MacroLink|aliasmanager_icon|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|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_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>


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

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

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

* {{MacroLink|CenterFace|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|Macro_Center_Align_Objects_with_Faces_or_Edges|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.
* {{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|Macro_Easy_Cutouts_for_Enclosures|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|Text-x-python|Macro MacroMenu|Macro MacroMenu}}: Add the macros found in the macros folder to the Macros menu of FreeCAD
* {{MacroLink|Force_Recompute|Macro ForceRecompute|Macro ForceRecompute}}: Forces manual recompute of model
* {{MacroLink|Icon=Macro_MacroMenu.png|Macro MacroMenu|Macro MacroMenu}}: Add the macros found in the macros folder to the Macros menu of FreeCAD
* {{MacroLink|Text-x-python|Macro Shake Sketch|Macro Shake Sketch}}: Shake a sketch in order to discover its unconstrained parts.
* {{MacroLink|Icon=Force_Recompute.png|Macro ForceRecompute|Macro ForceRecompute}}: Forces manual recompute of model
* {{MacroLink|Replace_Part|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_Recompute_Profiler.png|Macro Recompute Profiler|Macro Recompute Profiler}}: measures time it takes to recompute each object in a project
* {{MacroLink|Macro_Toggle_Drawstyle|Macro Toggle Drawstyle|Macro Toggle Drawstyle}}: This macro toggles the Drawstyle of the selected object
* {{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|Text-x-python|Macro HighlightCommon|Macro HighlightCommon}}: Highlight common parts.
* {{MacroLink|HighlightDifference|Macro HighlightDifference|Macro HighlightDifference}}: Compute the difference between two shapes.
* {{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|Text-x-python|Macro cross section|Macro cross section}}: displays an interactively slidable cross-section.
* {{MacroLink|Icon=Macro_HighlightCommon.png|Macro HighlightCommon|Macro HighlightCommon}}: Highlight common parts.
* {{MacroLink|BoundBoxTracing|Macro BoundingBox Tracing|Macro BoundingBox Tracing}}: This macro red trace (editable) around the BoundingBox with 6 rectangles
* {{MacroLink|Icon=HighlightDifference.png|Macro HighlightDifference|Macro HighlightDifference}}: Compute the difference between two shapes.
* {{MacroLink|Text-x-python|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 set of parameters.
* {{MacroLink|Icon=Macro_cross_section.png|Macro cross section|Macro cross section}}: displays an interactively slidable cross-section.
* {{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=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_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|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|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|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>


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

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

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

<div class="mw-translate-fuzzy">
* {{MacroLink/cs|Text-x-python|Macro Unroll Ruled Surface|Macro Unroll Ruled Surface}}: umonžuje rozbalit sbalené povrchy a nakreslit je na stránku.
* {{MacroLink/cs|Text-x-python|Macro Unroll Ruled Surface|Macro Unroll Ruled Surface}}: umonžuje rozbalit sbalené povrchy a nakreslit je na stránku.
* {{MacroLink/cs|Text-x-python|Macro Unfold Box|Macro Unfold Box}}: umožňuje rozložit povrchy krabice jakéhokoliv tvaru a nakreslit je na stránku.
* {{MacroLink/cs|Text-x-python|Macro Unfold Box|Macro Unfold Box}}: umožňuje rozložit povrchy krabice jakéhokoliv tvaru a nakreslit je na stránku.
* {{MacroLink/cs|Text-x-python|Macro Airfoil Import & Scale|Macro Airfoil Import & Scale}}: Imports and scales a .dat airfoil to desired chord length.
* {{MacroLink/cs|Text-x-python|Macro Airfoil Import & Scale|Macro Airfoil Import & Scale}}: Imports and scales a .dat airfoil to desired chord length.
* {{MacroLink/cs|Text-x-python|Macro Corner shapes wizard|Macro Corner shapes wizard}}: zobrazí vyskakovací dialogové okno pro zadání rozměrů rohového dílu a potom vytvoří v dokumentu objekt a vytvoří stránku s pohledy shora, zepředu a z boku dílu.
* {{MacroLink/cs|Text-x-python|Macro Corner shapes wizard|Macro Corner shapes wizard}}: zobrazí vyskakovací dialogové okno pro zadání rozměrů rohového dílu a potom vytvoří v dokumentu objekt a vytvoří stránku s pohledy shora, zepředu a z boku dílu.
</div>

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


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

===[[File:Std_FreeCADWebsite.png|32px]] Other interesting macros create by FreeCAD users and deposit in extra wiki.===
===[[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, ..... other
* [[Image:Text-x-python.png|24px]] [https://github.com/hamish2014?tab=repositories By hamish2014]: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, ...
* [[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/triplus?tab=repositories By triplus]: IconThemes, ShortCuts, NavigationIndicator, TabBar, Launcher, PersistentToolbars, PieMenu, ....
* [[Image:Text-x-python.png|24px]] [https://github.com/hamish2014?tab=repositories By hamish2014]: FreeCAD_assembly2, FreeCAD_drawing_dimensioning, and more.
* [[File:681.jpg |24px]] [https://github.com/wood-galaxy By rockn]: FreeCAD-Timber, FreeCAD-addons, FreeCAD-library, FreeCAD-StructuresBois, .... other
* [[Image:Text-x-python.png|24px]] [https://github.com/triplus?tab=repositories By triplus]: IconThemes, ShortCuts, NavigationIndicator, TabBar, Launcher, PersistentToolbars, PieMenu, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/oddtopus?tab=repositories By oddtopus]: flamingo (workbench for metal structures)
* [[Image:681.jpg|24px]] [https://github.com/wood-galaxy By rockn]: FreeCAD-Timber, FreeCAD-addons, FreeCAD-library, FreeCAD-StructuresBois, and more.
* [[Image:Text-x-python.png|24px]] [https://github.com/oddtopus?tab=repositories By oddtopus]: flamingo (workbench for metal structures).
* [[Image:Text-x-python.png|24px]] [https://github.com/dprojects/getDimensions By dprojects]: getDimensions FreeCAD macro to get chipboards dimensions to cut (woodworking).
* [[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.

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


== Použití ==
== Použití ==

[[File:Macro Recipes MacroHowToInstall.png|200px|left|Macro how to install]]
See [[how to install macros|how to install macros]] for a full description, and [[Customize Toolbars|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|how to install additional workbenches]] for this information.

=== Automatic installation ===
Starting with FreeCAD 0.17, use the [[Addon Manager|Addon Manager]] in {{MenuCommand|Tools → Addon manager}} to install a macro that has been included in the [https://github.com/FreeCAD/FreeCAD-macros FreeCAD-macros] repository.

<div class="mw-translate-fuzzy">
Výše uvedená makra mohou být snadno vložena do jakékoliv instalace FreeCADu
Výše uvedená makra mohou být snadno vložena do jakékoliv instalace FreeCADu
* Zkopírujte Python kód makra z příslušné stránky
* Zkopírujte Python kód makra z příslušné stránky
Line 193: Line 315:
* Stiskněte tlačítko Save (Uložit) a restartuje FreeCAD
* Stiskněte tlačítko Save (Uložit) a restartuje FreeCAD
* Otevřete Správce maker, vyberte nové makro a klikněte na "execute" (Spusť)
* Otevřete Správce maker, vyberte nové makro a klikněte na "execute" (Spusť)
</div>


<div class="mw-translate-fuzzy">
Navíc můžete nové makro přidat i na Váš uživatelský nástrojový pruh
Navíc můžete nové makro přidat i na Váš uživatelský nástrojový pruh
* Ve FreeCADu, jděte na Nástroje -> Uživatelský
* Ve FreeCADu, jděte na Nástroje -> Uživatelský
* Ve záložce Makra přidejte nové makro a pokud chcete definujte jeho ikonu a klávesovou zkratku
* Ve záložce Makra přidejte nové makro a pokud chcete definujte jeho ikonu a klávesovou zkratku
* V záložce Nástrojové pruhy vytvořte nový nástrojový pruh a přidejte Vaše nové makro přetáhnutím jej z kategorie "Makra".
* V záložce Nástrojové pruhy vytvořte nový nástrojový pruh a přidejte Vaše nové makro přetáhnutím jej z kategorie "Makra".
</div>
{{clear}}


[[Category:Repository/cs]]
== Přidání nového makra do tohoto repozitáře ==
[[Category:Macros/cs]]
* Vytvořte nové makro, jehož jméno bude začínat na "Macro", například"Macro_My_Excellent_Macro" (to může být snadno provedeno úpravou této stránky a přidáním nového odkazu na makro), například takto:
[[Category:Python Code/cs]]

{{Code|code=
<nowiki>* {{MacroLink|Text-x-python|Macro My Excellent Macro|Macro My Excellent Macro title}} : My excellent macro description</nowiki>.}}

* '''Text-x-python''' : icon by default (replace with your name icon with the exact same name as your macro page if there is. The format always '''.png''' only)
* '''Macro My Excellent Macro''' : macro name
* '''Macro My Excellent Macro title''' : macro name or title

A new page (red link) will be created.
* In that page, paste the following text:

(S defaultní ikonou)

<nowiki>{{Macro|Icon=Text-x-python|Name=Macro_My_Excellent_Macro|Description=What my excellent macro does|Author=your username|Version=1.0}}</nowiki>

(S uživatelskou ikonou)
<nowiki>{{Macro|Icon=Macro_My_Excellent_Macro|Name=Macro_My_Excellent_Macro|Description=What my excellent macro does|Author=your username|Version=1.0}}</nowiki>

(Another language with the default icon (example "/fr" "/de" "/it"....))

<nowiki>{{Macro/fr|Icon=Text-x-python|Name=Macro_My_Excellent_Macro|Name/fr=Macro_My_Excellent_Macro|Description=
What my excellent macro does|Author=your username|Version=1.0}}</nowiki>

(Another language with the icon custom (example "/fr" "/de" "/it"....))

<nowiki>{{Macro/fr|Icon=Macro_My_Excellent_Macro|Name=Macro_My_Excellent_Macro|Name/fr=Macro_My_Excellent_Macro|Description=
What my excellent macro does|Author=your username|Version=1.0}}</nowiki>

*You can also [http://www.freecadweb.org/wiki/index.php?title=Special:Upload Upload ] a custom format icon'''.png'''<br />'''Note that the name of the icon must have the same name as the name of the macro'''.
**example: " Macro_My_Excellent_Macro " '''without extension''' (the extension is given by the system), and, replace " Icon='''Text-x-python''' " by " Icon='''Macro_My_Excellent_Macro''' "
**'''Text-x-python''' [[Image:Text-x-python.png|32px]] is the default icon of the page dedicated to the Macro.

* Paste your macro, and use the [[Template:Code|Code template]] to avoid adding spaces into your script. This will display the macro in a monospace font inside a light grey box like the example above.
* If you like, upload a .png icon with the exact same name as your macro page (ex. Macro_My_Excellent_Macro.png)
* Add an image: an image is useful to show what the macro does. Optionally you can create an animated gif that represents the object in context. The gif image should have a maximum size of 500x500px as the wiki does not resize animated gifs; if the gif is any bigger the animation won't work.
* Optionally you can add some more info on how to use your macro, tips, limitations and workaround.
* It is also interesting to include version information in your macro. This macro allows you to locate in time compared to the evolution of FreeCAD, do "Menu > Help > About FreeCAD and click to Copy to clipboard" and paste it your macro

Ex:

{{Code|code=
#OS: Windows Vista
#Platform: 32-bit
#Version: 0.14.3389
#Python version: 2.6.2
#Qt version: 4.5.2
#Coin version: 3.1.0
#SoQt version: 1.4.1
#OCC version: 6.5.1
}}

It is also advisable to create a macro in your header, this header can be used by the [http://forum.freecadweb.org/viewtopic.php?t=10556 Plugin Loader] program to install the macro and check versions. Also available [https://github.com/FreeCAD/FreeCAD-addons addons_installer.FCMacro]

Ex:
{{Code|code=

__Title__="Title_Of_macro"
__Author__ = "User_Name"
__Version__ = "00.11"
__Date__ = "25/07/2015"

__Comment__ = "This is the comment of the macro"
__Web__ = "http://forum.freecadweb.org/viewtopic.php?f=3&t=7384"
__Wiki__ = "http://www.freecadweb.org/wiki/index.php?title=Macro_Title_Of_macro"
__Icon__ = "/usr/lib/freecad/Mod/plugins/icons/Title_Of_macro"
__IconW__ = "C:/Documents and Settings/YourUserName/Application Data/FreeCAD"
__Help__ = "start the macro and follow the instructions"
__Status__ = "stable"
__Requires__ = "freecad 0.14.3706"
__Communication__ = "http://www.freecadweb.org/wiki/index.php?title=User:User_Name"
}}


* Add it to the above categories, create a new category if needed.

===Tutorials===
* [[How to install macros|How to install macros]]
* [[Customize_Toolbars|Customize Toolbars]]
* [[How_to_install_additional_workbenches|How to install additional workbenches]]
[[Category:Repository]]
[[Category:Macros]]
[[Category:Python Code]]
<languages/>

Revision as of 11:35, 9 October 2019

Macros

Tato stránka obsahuje makra pro rozšíření funkcionality Vaší instalace FreeCADu.

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.

Makra

Operace s 3D pohledy

Animation

Code and Scripting

Conversion

Drawing Workbench

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

  • Template:MacroLink/cs: umožňuje uživateli získat pohled na objekt ve výkresu ve 4 různých pozicích (zepředu, shora, iso a zprava). Aby bylo dokonale efektivní, potřebuje ještě pár úprav.

Dxf 2D Draft

  • Template:MacroLink/cs: vytváří parametrický elipsový obdélník
  • Template:MacroLink/cs: vytváří kružnici podle 3 vybraných bodů, body mohou být objekty (tento příklad spojuje dva následující příklady, všechny parametry jsou uspořádány v grafickém okně).
  • Template:MacroLink/cs: vytváří kružnici podle 3 vybraných bodů v kolmých 2D
  • Template:MacroLink/cs: vytváří kružnici podle 3 vybraných bodů ve 3D prostoru
  • Template:MacroLink/cs: Pokud je to možné, konvertuje vybrané hrany do kružnicového oblouku. Užitečné pro obnovení rozlámaného oblouku.

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

  • Template:MacroLink/cs: dodá řadu informací o vybraném tvaru a může zobrazovat konverzi délky, sklonu (stupně, radiány) tvaru, povrch, objem a váhu tvaru v mezinárodních i anglosaských jednotkách.
  • Template:MacroLink/cs: dodá hodnotu Delta (úhel) a vzdálenost mezi 2 body.

Libraries

  • Template:MacroLink/cs: toto makro vytváří šroub s nebo bez závitu podle ISO standardů.
  • Template:MacroLink/cs: cílem BOLTSu je vybudovat bezplatnou open-source knihovnu standardních dílů pro CAD aplikace.

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.

Vytvoření objektu

  • Template:MacroLink/cs : vytváří kostku ze 4 bodů
  • Template:MacroLink/cs: vytváří těleso tažením 2D profilu po trajektorii předem vybrané ve 3D pohledu. 2D prvek může být vytvořen standardními nástroji GUI FreeCADu.

Transformace objektu

  • Template:MacroLink/cs: několikrát zkopíruje objekt do mřížkového pole
  • Template:MacroLink/cs: srovná nakreslené dráty (lomené čáry), které nejsou v jedné rovině, do jejich střední souřadnice Z
  • Template:MacroLink/cs: umožňuje najít a spojit všechny nespojené hrany do uzavřeného nespojeného drátu pomocí přímek
  • Template:MacroLink/cs: odstraní z objektu všechny parametrické asociativity a ponechá objekt jako samostatný tvar
  • Template:MacroLink/cs: dodělá vytvoření drátu z přímek a oblouků, které se nemusejí vzájemně dotýkat. Použijte tehdy, pokud normální funkce selže.
  • Template:MacroLink/cs: Oblouky jsou někdy transformovány do B-křivek, například, když se změní měřítko. Toto makro z toho znovuvytvoří platný oblouk. Je to užitečné před exportem do 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/cs: umonžuje rozbalit sbalené povrchy a nakreslit je na stránku.
  • Template:MacroLink/cs: umožňuje rozložit povrchy krabice jakéhokoliv tvaru a nakreslit je na stránku.
  • Template:MacroLink/cs: Imports and scales a .dat airfoil to desired chord length.
  • Template:MacroLink/cs: zobrazí vyskakovací dialogové okno pro zadání rozměrů rohového dílu a potom vytvoří v dokumentu objekt a vytvoří stránku s pohledy shora, zepředu a z boku dílu.

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.

Použití

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.

Výše uvedená makra mohou být snadno vložena do jakékoliv instalace FreeCADu

  • Zkopírujte Python kód makra z příslušné stránky
  • Ve FreeCADu, Makro->Makra->Nové, a dejte mu jméno
  • Vložte zkopírovaný kód
  • Stiskněte tlačítko Save (Uložit) a restartuje FreeCAD
  • Otevřete Správce maker, vyberte nové makro a klikněte na "execute" (Spusť)

Navíc můžete nové makro přidat i na Váš uživatelský nástrojový pruh

  • Ve FreeCADu, jděte na Nástroje -> Uživatelský
  • Ve záložce Makra přidejte nové makro a pokud chcete definujte jeho ikonu a klávesovou zkratku
  • V záložce Nástrojové pruhy vytvořte nový nástrojový pruh a přidejte Vaše nové makro přetáhnutím jej z kategorie "Makra".