Macro hinge/fr: Difference between revisions
m (Created page with "==Liens== La page de discussion sur le forum [http://forum.freecadweb.org/viewtopic.php?f=3&t=7606&p=62086#p62086 Struggling with LinearPattern (again)]") |
No edit summary |
||
(26 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
{{Macro/fr|Icon=Text-x-python|Name=Hinge Simul|Name/fr=Hinge Simul|Description=Simulation de mouvement d'une charnière.|Author=Mario52}} |
|||
{{Macro/fr |
|||
|Name=Hinge Simul |
|||
|Description=Simulation de mouvement d'une charnière. |
|||
|Icon=Macro hinge.png |
|||
|Author=Mario52 |
|||
|Version=1.0 |
|||
|Date=2014-09-09 |
|||
|FCVersion=All |
|||
|Download=The File [http://forum.freecadweb.org/download/file.php?id=7628 20140908b_Hinge-1.fcstd]<br />[https://www.freecadweb.org/wiki/images/a/a8/Macro_hinge.png ToolBar Icon] |
|||
}} |
|||
==Description== |
|||
Simulation de pivotement d'une charnière |
Simulation de pivotement d'une charnière |
||
[[File:Hing_00.gif|left]] |
[[File:Hing_00.gif|left]] |
||
{{clear}} |
|||
==Utilisation== |
==Utilisation== |
||
Ouvrez les deux fichiers (20140908b_Hinge-1.FCMacro |
Ouvrez les deux fichiers (20140908b_Hinge-1.FCMacro et 20140908b_Hinge-1.FCStd) dans FreeCAD avec 2 écrans (Menu: Fenêtre > Mosaïque) et lancez la macro ou lancez la macro avec le bouton [[File:Std_DlgMacroExecuteDirect.svg]] |
||
[[File:Hing_01.png|left|300px]]{{clear}} |
[[File:Hing_01.png|left|300px|Charnière]]{{clear}} |
||
== |
==Le Fichier== |
||
[http://forum.freecadweb.org/download/file.php?id=7628 20140908b_Hinge-1.fcstd] |
[http://forum.freecadweb.org/download/file.php?id=7628 20140908b_Hinge-1.fcstd] |
||
==Script== |
==Script== |
||
ToolBar Icon [[Image:Macro_hinge.png]] |
|||
⚫ | |||
⚫ | |||
<syntaxhighlight> |
|||
{{MacroCode|code= |
|||
import FreeCAD, FreeCADGui, Draft, Part |
import FreeCAD, FreeCADGui, Draft, Part |
||
from FreeCAD import Base |
from FreeCAD import Base |
||
Line 38: | Line 52: | ||
time.sleep(0) #modify the time here |
time.sleep(0) #modify the time here |
||
}} |
|||
</syntaxhighlight> |
|||
==Liens== |
==Liens== |
||
La page de discussion sur le forum [http://forum.freecadweb.org/viewtopic.php?f=3&t=7606&p=62086#p62086 Struggling with LinearPattern (again)] |
La page de discussion sur le forum [http://forum.freecadweb.org/viewtopic.php?f=3&t=7606&p=62086#p62086 Struggling with LinearPattern (again)] |
||
{{clear}} |
{{clear}} |
||
⚫ |
Latest revision as of 16:36, 18 June 2020
Description |
---|
Simulation de mouvement d'une charnière. Version macro : 1.0 Date dernière modification : 2014-09-09 Version FreeCAD : All Téléchargement : The File 20140908b_Hinge-1.fcstd ToolBar Icon Auteur: Mario52 |
Auteur |
Mario52 |
Téléchargement |
The File 20140908b_Hinge-1.fcstd ToolBar Icon |
Liens |
Page des macros Comment installer une macro Comment créer une barre d'outils |
Version Macro |
1.0 |
Dernière modification |
2014-09-09 |
Version(s) FreeCAD |
All |
Raccourci clavier |
None |
Voir aussi |
None |
Description
Simulation de pivotement d'une charnière
Utilisation
Ouvrez les deux fichiers (20140908b_Hinge-1.FCMacro et 20140908b_Hinge-1.FCStd) dans FreeCAD avec 2 écrans (Menu: Fenêtre > Mosaïque) et lancez la macro ou lancez la macro avec le bouton
Le Fichier
Script
20140908b_Hinge-1.FCMacro
import FreeCAD, FreeCADGui, Draft, Part from FreeCAD import Base import time ii = 0 pas = 0 for ii2 in range(180): if pas == 0: if ii > 90: pas = 1 ii += 5 else: if ii < 1: pas = 0 ii -= 5 App.getDocument("_0140908b_Hinge_1").Fusion.Placement=App.Placement(App.Vector(0,0,0), App.Rotation(App.Vector(0,0,1),ii), App.Vector(44.4,6.9,0)) App.Console.PrintMessage(str(ii2)+" " + str(ii)+" " + str(pas) +"\n") Gui.updateGui() time.sleep(0) #modify the time here
Liens
La page de discussion sur le forum Struggling with LinearPattern (again)