FreeCAD-Doc/localwiki/Draft_PathArray-cs.html
2018-07-19 18:47:02 -05:00

131 lines
10 KiB
HTML

<html><head><title>Draft PathArray/cs</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Draft PathArray/cs</h1></div>
<div id="mw-content-text" lang="cs" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><table class="fcinfobox wikitable ct" >
<tr>
<td class="ctTitle">
<h3><span class="mw-headline" id="Kreslen.C3.AD_Trasov.C3.A9Pole"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Draft_PathArray.png" class="image"><img alt="Draft PathArray.png" src="32px-Draft_PathArray.png" width="32" height="32" srcset="/wiki/images/thumb/c/c1/Draft_PathArray.png/48px-Draft_PathArray.png 1.5x, /wiki/images/c/c1/Draft_PathArray.png 2x" /></a> Kreslení TrasovéPole</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Umístění Menu
</th></tr>
<tr>
<td class="ctEven">Draft → PathArray
</td></tr>
<tr>
<th class="ctOdd">Pracovní stoly
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Draft_Module/cs" title="Draft Module/cs">Kreslení</a>, <a href="https://www.freecadweb.org/wiki/index.php?title=Arch_Module/cs" title="Arch Module/cs">Architektura</a>
</td></tr>
<tr>
<th class="ctOdd">Výchozí zástupce
</th></tr>
<tr>
<td class="ctEven">Nikdo
</td></tr>
<tr>
<th class="ctOdd">Viz také
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Draft_Array/cs" title="Draft Array/cs">Draft Array</a>
</td></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="#Kreslen.C3.AD_Trasov.C3.A9Pole"><span class="tocnumber">1</span> <span class="toctext">Kreslení TrasovéPole</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Popis"><span class="tocnumber">2</span> <span class="toctext">Popis</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Pou.C5.BEit.C3.AD"><span class="tocnumber">3</span> <span class="toctext">Použití</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Volby"><span class="tocnumber">4</span> <span class="toctext">Volby</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#Vlastnosti"><span class="tocnumber">5</span> <span class="toctext">Vlastnosti</span></a></li>
<li class="toclevel-1 tocsection-5"><a href="#Skriptov.C3.A1n.C3.AD"><span class="tocnumber">6</span> <span class="toctext">Skriptování</span></a></li>
<li class="toclevel-1 tocsection-6"><a href="#Usage_Notes"><span class="tocnumber">7</span> <span class="toctext">Usage Notes</span></a></li>
<li class="toclevel-1 tocsection-7"><a href="#Omezen.C3.AD"><span class="tocnumber">8</span> <span class="toctext">Omezení</span></a></li>
<li class="toclevel-1 tocsection-8"><a href="#Technical_Explanation"><span class="tocnumber">9</span> <span class="toctext">Technical Explanation</span></a></li>
</ul>
</div>
</td></tr></table>
<p><br />
</p>
<h2><span class="mw-headline" id="Popis">Popis</span></h2>
<p>Nástroj TrasovéPole umístí vybraný tvar na vybranou trasu. Trasa může být drát nebo jedna nebo více hran. Tvary na trase mohou být volitelně zarovnány podle trasy. Podle potřeby může být specifikován Vektor pro posunutí tvaru tak, že těžiště tvaru bude na trase. Pokud není vybrán žádný objekt, budete vyzváni k jeho výběru.
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Draft_PathArray_Example.png" class="image"><img alt="Draft PathArray Example.png" src="Draft_PathArray_Example.png" width="400" height="235" /></a>
</p>
<h2><span class="mw-headline" id="Pou.C5.BEit.C3.AD">Použití</span></h2>
<ol><li> Vyberte objekt tvaru, který chcete kopírovat.</li>
<li> Vyberte objekt trasy, po které chcete tvar kopírovat -nebo-</li>
<li> Vyberte nějaké hrany pro určení trasy.</li>
<li> Stiskněte tlačítko <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Draft_PathArray.png" class="image"><img alt="Draft PathArray.png" src="16px-Draft_PathArray.png" width="16" height="16" srcset="/wiki/images/thumb/c/c1/Draft_PathArray.png/24px-Draft_PathArray.png 1.5x, 32px-Draft_PathArray.png 2x" /></a> <a class="mw-selflink selflink">Kreslení TrasovéPole</a></span>.</li></ol>
<h2><span class="mw-headline" id="Volby">Volby</span></h2>
<ul><li> Pole začne s kopiemi tvaru, které nejsou zarovnány podle trasy ani defaultně posunuty na novou pozici. Ve vlastnostech můžete měnit počet, zarovnání a/nebo vektor posunutí.</li></ul>
<h2><span class="mw-headline" id="Vlastnosti">Vlastnosti</span></h2>
<ul><li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Base</b>: Objekt tvaru</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>PathObj</b>: Objekt trasy</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>PathSubs</b>: Subelementy(hrany) objektu trasy, které budou použity jako trasa </li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Count</b>: Počet kopií tvaru</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Xlate</b>: Vektor posunutí</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Align</b>: Hodnota True pro zarovnání tvarů podle trasy, False pro ponechání tvarů podle jejich původní orientace.</li></ul>
<h2><span class="mw-headline" id="Skriptov.C3.A1n.C3.AD">Skriptování</span></h2>
<p>Nástroj TrasovéPole může být využit v <a href="Macros.html" title="Macros">makrech</a> a z konzoly Pythonu použitím následující funkce:
</p>
<pre>makePathArray(shapeobject,pathobject,count,[translationvector],[alignment],[listofpathsubelements]) </pre>
<ul><li> Rozloží požadovaný počet (count) kopií objektu shapeobject podél trasy pathobject nebo subobject (vybrané hrany) pathobjectu. Volitelně posune každou kopii ve směru a vzdálenosti podle FreeCAD.Vectoru pro nastavení rozdílu mezi středem tvaru a referenčním bodem tvaru. Volitelně zarovná baseobject tangenciálně/normálně/binormálně k trase.</li></ul>
<p>Příklad:
</p>
<pre>import FreeCAD,Draft
Draft.makePathArray(base,path,items,centretrans,orient,pathsubs) </pre>
<h2><span class="mw-headline" id="Usage_Notes">Usage Notes</span></h2>
<ul><li> Align + Xlate: When Align is True, the Xlate vector is relative to the local (tangent/normal/binormal) coordinates. When Align is False, the Xlate vector is relative to the global (XYZ) coordinates. </li></ul>
<h2><span class="mw-headline" id="Omezen.C3.AD">Omezení</span></h2>
<ul><li> Tento nástroj je dostupný až od verze 0.14</li>
<li> Vlastnost PathSubs se zatím nezobrazuje v seznamu vlastností.</li></ul>
<h2><span class="mw-headline" id="Technical_Explanation">Technical Explanation</span></h2>
<p>When "Align = false", PathArray's logic is quite easy to understand.
</p>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Patharray_NoAlign.png" class="image" title="Align false"><img alt="Align false" src="Patharray_NoAlign.png" width="600" height="483" /></a></div>
<div style="clear:both"></div>
<p><br />
When "Align = true" the logic is a bit harder to grasp:
</p>
<ol><li> Construct Frenet coordinate systems on the path (X is tangent, Z is normal, Y is binormal).</li>
<li> Copy the original object to every on-path coordinate system, so that the global origin is matched with the on-path coordinate system origin.</li></ol>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Patharray_alignment_annotated.png" class="image"><img alt="Patharray alignment annotated.png" src="600px-Patharray_alignment_annotated.png" width="600" height="325" srcset="/wiki/images/thumb/e/e1/Patharray_alignment_annotated.png/900px-Patharray_alignment_annotated.png 1.5x, /wiki/images/thumb/e/e1/Patharray_alignment_annotated.png/1200px-Patharray_alignment_annotated.png 2x" /></a></div>
<div style="clear:both"></div>
<p><br />
It is much easier to understand with pictures. The following images show how the array is produced, depending on which plane is the path.
</p>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Patharray_alignment.png" class="image" title="XY Plane"><img alt="XY Plane" src="600px-Patharray_alignment.png" width="600" height="325" srcset="/wiki/images/thumb/7/73/Patharray_alignment.png/900px-Patharray_alignment.png 1.5x, /wiki/images/thumb/7/73/Patharray_alignment.png/1200px-Patharray_alignment.png 2x" /></a></div>
<div style="clear:both"></div>
<p>Path on XY Plane
<br />
</p>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Patharray_alignment-XZ.png" class="image" title="XZ Plane"><img alt="XZ Plane" src="600px-Patharray_alignment-XZ.png" width="600" height="325" srcset="/wiki/images/thumb/c/c9/Patharray_alignment-XZ.png/900px-Patharray_alignment-XZ.png 1.5x, /wiki/images/thumb/c/c9/Patharray_alignment-XZ.png/1200px-Patharray_alignment-XZ.png 2x" /></a></div>
<div style="clear:both"></div>
<p>Path on XZ Plane
<br />
</p>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Patharray_alignment-YZ.png" class="image" title="YZ Plane"><img alt="YZ Plane" src="600px-Patharray_alignment-YZ.png" width="600" height="325" srcset="/wiki/images/thumb/7/73/Patharray_alignment-YZ.png/900px-Patharray_alignment-YZ.png 1.5x, /wiki/images/thumb/7/73/Patharray_alignment-YZ.png/1200px-Patharray_alignment-YZ.png 2x" /></a></div>
<div style="clear:both"></div>
<p>Path on YZ Plane
<br />
</p>
<div style="clear:both"></div>
<p><br />
The clear advantage of this logic is that as you reorient the path but not the object, the result is consistent - object remains aligned to the path the way it was before reorienting the path.
</p><p>(Thanks to @DeepSOIC for this explanation)
</p>
</div>
</div>
</div><div class="printfooter">
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Draft_PathArray/cs&amp;oldid=208396">http://www.freecadweb.org/wiki/index.php?title=Draft_PathArray/cs&amp;oldid=208396</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>