FreeCAD-Doc/localwiki/Macro_Normal_Vector.html
2018-07-08 12:11:49 -05:00

82 lines
3.7 KiB
HTML

<html><head><title>Macro Normal Vector</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 Normal Vector</h1></div>
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><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="Normal_Vector_Macro"><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> Normal Vector Macro</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Description
</th></tr>
<tr>
<td class="ctEven left macro-description">Get normal vector of preselected face
</td></tr>
<tr>
<th class="ctOdd">Author
</th></tr>
<tr>
<td class="ctEven macro-author"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Ulrich1a&amp;action=edit&amp;redlink=1" class="new" title="User:Ulrich1a (page does not exist)">ulrich1a</a>
</td></tr>
<tr>
<th class="ctOdd">Links
</th></tr>
<tr>
<td class="ctEven"><a href="Macros_recipes.html" title="Macros recipes">Macros recipes</a><br /><a href="How_to_install_macros.html" title="How to install macros">How to install macros</a><br /><a href="Customize_Toolbars.html" title="Customize Toolbars">How to customize toolbars</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 last modification
</th></tr>
<tr>
<td class="ctEven macro-date">2016-09-26
</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="#Normal_Vector_Macro"><span class="tocnumber">1</span> <span class="toctext">Normal Vector Macro</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Use"><span class="tocnumber">2</span> <span class="toctext">Use</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Script"><span class="tocnumber">3</span> <span class="toctext">Script</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Link"><span class="tocnumber">4</span> <span class="toctext">Link</span></a></li>
</ul>
</div>
</td></tr>
</table>
<p><br />
</p><p>Simple macro to extract normal vector of previously within the 3D-View chosen face and give the output to the python console
</p>
<h3><span class="mw-headline" id="Use">Use</span></h3>
<ul><li> Choose Face in 3D View.</li>
<li> Copy Macro code to python console.</li>
<li> FreeCAD will then display normal vector information in python console.</li>
<li> Use these values for setting up direction when creating a drawing view.</li></ul>
<h3><span class="mw-headline" id="Script">Script</span></h3>
<pre>Gui.Selection.getSelectionEx()[0].SubObjects[0].Faces[0].normalAt(0,0) </pre>
<h3><span class="mw-headline" id="Link">Link</span></h3>
<p><a rel="nofollow" class="external text" href="http://forum.freecadweb.org/viewtopic.php?f=13&amp;t=10959">Link to dicussion thread (german)</a>
</p><p><br />
</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_Normal_Vector&amp;oldid=240160">http://www.freecadweb.org/wiki/index.php?title=Macro_Normal_Vector&amp;oldid=240160</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>