Macro hinge/fr: Difference between revisions
mNo edit summary |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|Name=Hinge Simul |
|Name=Hinge Simul |
||
|Description=Simulation de mouvement d'une charnière. |
|Description=Simulation de mouvement d'une charnière. |
||
|Icon=Macro hinge.png |
|||
|Author=Mario52 |
|Author=Mario52 |
||
|Version=1.0 |
|Version=1.0 |
||
|Date=2014-09-09 |
|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] |
|||
}} |
}} |
||
Line 16: | Line 19: | ||
==Utilisation== |
==Utilisation== |
||
Ouvrez les deux fichiers ( |
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|Charnière]]{{clear}} |
[[File:Hing_01.png|left|300px|Charnière]]{{clear}} |
||
Line 23: | Line 26: | ||
[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]] |
|||
'''20140908b_Hinge-1.FCMacro''' |
'''20140908b_Hinge-1.FCMacro''' |
||
{{ |
{{MacroCode|code= |
||
import FreeCAD, FreeCADGui, Draft, Part |
import FreeCAD, FreeCADGui, Draft, Part |
||
from FreeCAD import Base |
from FreeCAD import Base |
||
Line 48: | Line 53: | ||
}} |
}} |
||
==Liens== |
==Liens== |
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)