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

131 lines
10 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><title>Draft PathArray/tr</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/tr</h1></div>
<div id="mw-content-text" lang="tr" 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="Draft_PathArray"><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> Draft PathArray</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Menü konumu
</th></tr>
<tr>
<td class="ctEven">Draft → PathArray
</td></tr>
<tr>
<th class="ctOdd">Workbenches
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Draft_Module/tr" title="Draft Module/tr">Draft</a>, <a href="https://www.freecadweb.org/wiki/index.php?title=Arch_Module/tr" title="Arch Module/tr">Arch</a>
</td></tr>
<tr>
<th class="ctOdd">Varsayılan kısayol
</th></tr>
<tr>
<td class="ctEven">Hiçbiri
</td></tr>
<tr>
<th class="ctOdd">Ayrıca bkz
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Draft_Array/tr" title="Draft Array/tr">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="Draft_PathArray.html"><span class="tocnumber">1</span> <span class="toctext">Draft PathArray</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Description"><span class="tocnumber">2</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#How_to_use"><span class="tocnumber">3</span> <span class="toctext">How to use</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Options"><span class="tocnumber">4</span> <span class="toctext">Options</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#Properties"><span class="tocnumber">5</span> <span class="toctext">Properties</span></a></li>
<li class="toclevel-1 tocsection-5"><a href="#Scripting"><span class="tocnumber">6</span> <span class="toctext">Scripting</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="#Limitations"><span class="tocnumber">8</span> <span class="toctext">Limitations</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="Description">Description</span></h2>
<p>The PathArray tool places copies of a selected shape along a selected path. The path can be a Wire or one or more Edges. The shapes can optionally be aligned with the tangent of the path. If required, a translation Vector can be specified to shift the shapes so the centroid is on the path. If no objects are selected, you will be invited to select them.
</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="How_to_use">How to use</span></h2>
<ol><li> Select a shape object you wish to distribute.</li>
<li> Select a path object along which the shapes will be distributed. -or-</li>
<li> Select some edges of a path object.</li>
<li> Press the <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 href="Draft_PathArray.html" title="Draft PathArray">Draft PathArray</a></span> button.</li></ol>
<h2><span class="mw-headline" id="Options">Options</span></h2>
<ul><li> The array starts with shape copies which are not aligned to the path, nor translated to a new position by default. You can then change the count, alignment and/or translation vector in the properties.</li></ul>
<h2><span class="mw-headline" id="Properties">Properties</span></h2>
<ul><li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Base</b>: The shape object</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>PathObj</b>: The path object</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>PathSubs</b>: The subelements(edges) of path object to be used as the path</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Count</b>: The number of time to copy the shape</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Xlate</b>: The translation vector</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Align</b>: True to align the shapes to the path, False to leave shapes in their default orientation.</li></ul>
<h2><span class="mw-headline" id="Scripting">Scripting</span></h2>
<p>The PathArray tool can by used in <a href="Macros.html" title="Macros">macros</a> and from the python console by using the following function:
</p>
<pre>makePathArray(shapeobject,pathobject,count,[translationvector],[alignment],[listofpathsubelements]) </pre>
<ul><li> Distribute count copies of a document shapeobject along a pathobject or subobjects of a pathobject. Optionally translates each copy by FreeCAD.Vector xlate direction and distance to adjust for difference in shape centre vs shape reference point. Optionally aligns baseobject to tangent/normal/binormal of path.</li></ul>
<p>Example:
</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="Limitations">Limitations</span></h2>
<ul><li> This tool is not available before version 0.14</li>
<li> The PathSubs Property does not yet appear in the properties list.</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/tr&amp;oldid=208398">http://www.freecadweb.org/wiki/index.php?title=Draft_PathArray/tr&amp;oldid=208398</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>