110 lines
5.3 KiB
HTML
110 lines
5.3 KiB
HTML
<html><head><title>Macro hinge/fr</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Macro hinge/fr</h1></div>
|
|
|
|
<div id="mw-content-text" lang="fr" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><table class="fcinfobox wikitable ct" width="100%" style="float: right; width: 230px; margin-left: 10px;">
|
|
<tr>
|
|
<td class="ctTitle">
|
|
<h3><span class="mw-headline" id="Hinge_Simul"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Text-x-python.png" class="image"><img alt="Text-x-python.png" src="32px-Text-x-python.png" width="32" height="32" srcset="/wiki/images/2/2c/Text-x-python.png 1.5x" /></a> Hinge Simul</span></h3>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Description
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven left">Simulation de mouvement d'une charnière.
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Auteur
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Mario52" title="User:Mario52">Mario52</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Liens
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Macros_recipes/fr" title="Macros recipes/fr">Recettes macros</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=How_to_install_macros/fr" title="How to install macros/fr">Comment installer une macro</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=Customize_Toolbars/fr" title="Customize Toolbars/fr">Comment ajouter une barre d'outils</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Version
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-version">1.0
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Date dernière modification
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-date">2014-09-09
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
|
<ul>
|
|
<li class="toclevel-1"><a href="#Hinge_Simul"><span class="tocnumber">1</span> <span class="toctext">Hinge Simul</span></a></li>
|
|
<li class="toclevel-1 tocsection-1"><a href="#Utilisation"><span class="tocnumber">2</span> <span class="toctext">Utilisation</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#Les_Fichiers"><span class="tocnumber">3</span> <span class="toctext">Les Fichiers</span></a></li>
|
|
<li class="toclevel-1 tocsection-3"><a href="#Script"><span class="tocnumber">4</span> <span class="toctext">Script</span></a></li>
|
|
<li class="toclevel-1 tocsection-4"><a href="#Liens"><span class="tocnumber">5</span> <span class="toctext">Liens</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</td></tr>
|
|
</table>
|
|
<p><br />
|
|
</p><p>Simulation de pivotement d'une charnière
|
|
</p>
|
|
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Hing_00.gif" class="image"><img alt="Hing 00.gif" src="Hing_00.gif" width="428" height="413" /></a></div><div style="clear:both"></div>
|
|
<p><br />
|
|
</p>
|
|
<h2><span class="mw-headline" id="Utilisation">Utilisation</span></h2>
|
|
<p>Ouvrez les deux fichiers (<b>20140908b_Hinge-1.FCMacro</b> and <b>20140908b_Hinge-1.FCStd</b>) dans FreeCAD avec 2 écrans Menu: Fenêtre > Mosaïque et lancez la macro ou lancez la macro avec le bouton <a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro-execute.svg" class="image"><img alt="Macro-execute.svg" src="Macro-execute.svg" width="24" height="24" /></a>
|
|
</p>
|
|
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Hing_01.png" class="image" title="Charnière"><img alt="Charnière" src="300px-Hing_01.png" width="300" height="154" srcset="/wiki/images/thumb/7/7b/Hing_01.png/450px-Hing_01.png 1.5x, /wiki/images/thumb/7/7b/Hing_01.png/600px-Hing_01.png 2x" /></a></div><div style="clear:both"></div>
|
|
<p><br />
|
|
</p>
|
|
<h2><span class="mw-headline" id="Les_Fichiers">Les Fichiers</span></h2>
|
|
<p><a rel="nofollow" class="external text" href="http://forum.freecadweb.org/download/file.php?id=7628">20140908b_Hinge-1.fcstd</a>
|
|
</p>
|
|
<h2><span class="mw-headline" id="Script">Script</span></h2>
|
|
<p>20140908b_Hinge-1.FCMacro
|
|
</p>
|
|
<pre>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 </pre>
|
|
<h2><span class="mw-headline" id="Liens">Liens</span></h2>
|
|
<p>La page de discussion sur le forum <a rel="nofollow" class="external text" href="http://forum.freecadweb.org/viewtopic.php?f=3&t=7606&p=62086#p62086">Struggling with LinearPattern (again)</a>
|
|
</p>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Macro_hinge/fr&oldid=239984">http://www.freecadweb.org/wiki/index.php?title=Macro_hinge/fr&oldid=239984</a>"</div>
|
|
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="mw-navigation">
|
|
<h2>Navigation menu</h2>
|
|
|
|
</body></html> |