110 lines
5.2 KiB
HTML
110 lines
5.2 KiB
HTML
<html><head><title>Macro hinge/it</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/it</h1></div>
|
|
|
|
<div id="mw-content-text" lang="it" 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">Descrizione
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven left">Simula il movimento di una cerniera.
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Autore
|
|
</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">Link
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Macros_recipes/it" title="Macros recipes/it">Esempi di macro</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=How_to_install_macros/it" title="How to install macros/it">Come installare le Macro</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=Customize_Toolbars/it" title="Customize Toolbars/it">Personalizzare la barra degli strumenti</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Versione
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-version">1.0
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Data ultima modifica
|
|
</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="#Uso"><span class="tocnumber">2</span> <span class="toctext">Uso</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#Il_File"><span class="tocnumber">3</span> <span class="toctext">Il File</span></a></li>
|
|
<li class="toclevel-1 tocsection-3"><a href="#Lo_Script"><span class="tocnumber">4</span> <span class="toctext">Lo Script</span></a></li>
|
|
<li class="toclevel-1 tocsection-4"><a href="#Link"><span class="tocnumber">5</span> <span class="toctext">Link</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</td></tr>
|
|
</table>
|
|
<p><br />
|
|
</p><p>Simula il movimento di una cerniera di una porta.
|
|
</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>
|
|
<h3><span class="mw-headline" id="Uso">Uso</span></h3>
|
|
<p>Per eseguire la macro aprire in FreeCAD i 2 file (20140908b_Hinge-1.FCMacro e 20140908b_Hinge-1.FCStd) in 2 schermi (Menu: Finestre -> Affiancate) poi fare clic nella finestra e nella macro fare clic su F6 (avvia macro), oppure avviare la macro con <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="64" height="64" /></a>
|
|
</p>
|
|
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Hing_01.png" class="image"><img alt="Hing 01.png" 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>
|
|
<h3><span class="mw-headline" id="Il_File">Il File</span></h3>
|
|
<p><a rel="nofollow" class="external text" href="http://forum.freecadweb.org/download/file.php?id=7628">20140908b_Hinge-1.fcstd</a>
|
|
</p>
|
|
<h3><span class="mw-headline" id="Lo_Script">Lo Script</span></h3>
|
|
<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>
|
|
<h3><span class="mw-headline" id="Link">Link</span></h3>
|
|
<p>La pagina della discussione: <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/it&oldid=239986">http://www.freecadweb.org/wiki/index.php?title=Macro_hinge/it&oldid=239986</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> |