Macros recipes/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{TutorialInfo/cs
|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">
Tato stránka obsahuje makra pro rozšíření funkcionality Vaší instalace FreeCADu.
Tato stránka obsahuje makra pro rozšíření funkcionality Vaší instalace FreeCADu.
Line 16: Line 13:


== 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">
<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.
Line 25: Line 26:
* {{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>
Line 30: Line 32:


===[[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 46: Line 49:


===[[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>
Line 54: Line 62:


===[[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/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>
Line 65: Line 76:


===[[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/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>
Line 77: Line 91:


===[[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 83: 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>
Line 89: Line 106:


===[[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 97: Line 117:


===[[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">
<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>
Line 108: Line 131:


===[[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 117: Line 142:


===[[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 129: Line 157:


===[[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 137: Line 167:


===[[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">
<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>
Line 148: Line 181:


===[[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 155: 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>
Line 161: Line 197:


===[[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 169: Line 208:


===[[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 177: Line 219:


===[[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 188: Line 233:


===[[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|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 214: Line 268:


===[[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>
Line 225: Line 284:


===[[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 234: Line 295:
* [[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>



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

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