146 lines
12 KiB
HTML
146 lines
12 KiB
HTML
<html><head><title>Macro CloneConvert/de</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 CloneConvert/de</h1></div>
|
||
|
||
<div id="mw-content-text" lang="de" dir="ltr" class="mw-content-ltr"><hr/>
|
||
<div class="mw-parser-output"><div class="mw-translate-fuzzy">
|
||
<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="Macro_CloneConvert"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_CloneConvert.png" class="image"><img alt="Macro CloneConvert.png" src="32px-Macro_CloneConvert.png" width="32" height="32" srcset="/wiki/images/thumb/0/0a/Macro_CloneConvert.png/48px-Macro_CloneConvert.png 1.5x, Macro_CloneConvert.png 2x" /></a> Macro CloneConvert</span></h3>
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Beschreibung
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven left">Creates a clone of the object and the converted in the chosen position and size (inch, mm, m, µm...).
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Autor
|
||
</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/de" title="Macros recipes/de">Liste von Macros</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=How_to_install_macros/de" title="How to install macros/de">How to install macros</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=Customize_Toolbars/de" title="Customize Toolbars/de">How to customize toolbars</a>
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Version
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven macro-version">0.10
|
||
</td></tr>
|
||
<tr>
|
||
<th class="ctOdd">Datum zuletzt geändert
|
||
</th></tr>
|
||
<tr>
|
||
<td class="ctEven macro-date">2017-06-07
|
||
</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="#Macro_CloneConvert"><span class="tocnumber">1</span> <span class="toctext">Macro CloneConvert</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="#Uses"><span class="tocnumber">3</span> <span class="toctext">Uses</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="#Revision"><span class="tocnumber">5</span> <span class="toctext">Revision</span></a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
</td></tr>
|
||
</table>
|
||
<p><br />
|
||
</p>
|
||
</div>
|
||
<h2><span class="mw-headline" id="Description">Description</span></h2>
|
||
<p>Creates a clone or copy of the object and the converted in the chosen position and size (inch, mm, m, µm...) or free. The base object is recognized in mm (FreeCAd base)
|
||
</p>
|
||
<h2><span class="mw-headline" id="Uses">Uses</span></h2>
|
||
<p>Run the macro, the XYZ settings, choose "Clone" or "Copy" a unit or one value of choice select your object, and click <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Ok</span> button.
|
||
</p><p>If no value is entered a copy or clone will be created without modification. If no object is selected the <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Ok</span> button will be colored in red.
|
||
</p><p>The value of the <b>BoundingBox</b>, <b>Volume</b> and <b>Surface</b> is diplayed in the Report view, in the case of <b>Copy</b> multiple object, the display will show BoundingBox 0.0.
|
||
</p><p><br />
|
||
The base is the mm example with a <b>1 mm</b> cube of side :
|
||
</p><p>Select in the comboBox <b>inch</b>, <b>1 inch = 25.4 mm</b> , the fields <b>"Scale free"</b> automatically adjusts to 25.4 (the values in <b>"Scale-free"</b> can be changed separately). Click <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Ok</span> button, the clone created will have <b>25,4 mm x 25,4 mm x 25,4 mm</b>
|
||
</p><p><b>150%</b> = <b>1,50</b> in the <b>"Scale free"</b> fields <br />
|
||
<b>104%</b> = <b>1,04</b> in the <b>"Scale free"</b> fields
|
||
</p><p>Inverse operation :
|
||
</p><p>If you want to reduce an object ex: a cube 25.4 mm (1 inch) in cube 1 mm sides, use the following formula, <b>1 / 25.4 = 0.0393700</b> and enter the value <b>0,0393700</b> (with comma) in the Scale field XY and Z.
|
||
</p><p>In a cube of 5 mm, made <b>5 / 25.4 = 0.1968503</b> and enter the value <b>0,1968503</b> (with comma) in the Scale field XY and Z.
|
||
</p><p><b>50%</b> = <b>0,50</b> in the <b>"Scale free"</b> fields<br />
|
||
<b> 4%</b> = <b>0,04</b> in the <b>"Scale free"</b> fields
|
||
<br />
|
||
</p><p>Predefined units are :
|
||
km, hm, dam, m, dm, cm, <b>mm</b>, µm, nm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.
|
||
<br /><br />
|
||
</p>
|
||
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_CloneConvert_01.png" class="image" title="CloneConvert"><img alt="CloneConvert" src="220px-Macro_CloneConvert_01.png" width="220" height="546" srcset="/wiki/images/c/cd/Macro_CloneConvert_01.png 1.5x" /></a></div>
|
||
<ul><li> <b>Mode</b></li>
|
||
<li> <b>Clone  :</b> The object(s) clone are create </li>
|
||
<li> <b>Copy  :</b> One copy of the objet(s) is create</li>
|
||
<li> <b>Comp  :</b> One compound of the objet(s) is create</li>
|
||
<li> <b>Increm. :</b> incrementing the coordinates data to the original coordinates of the object (Placement, Rotation ...)<br />If this is not checked the Placement begin in coordinates 0,0,0 of FreeCAD<br />In case a compound Placement information is [0,0,0] the Placement begin in the position of object<br />If the real location is away from the base coordinates 0,0,0 use the <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">ValueAt()</span> button for the real Placement of the subObject selected Face, Wire, Line ....</li>
|
||
<li> <b>Unique  :</b> If this checkBox is checked and multiple object selected, the clone created is one unique object</li></ul>
|
||
<ul><li> <b>Coordinates</b></li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">...</span> :</b> This button align the YZ values on the value of X to have the same values XYZ (or manually). Two click reset the coordinates values to 0.0 </li>
|
||
<li> <b>Coordinate X :</b> Move the copy to the Coordinate X selected (Base 0,0,0 if Increm. is not checked)</li>
|
||
<li> <b>Coordinate Y :</b> Move the copy to the Coordinate Y selected (Base 0,0,0 if Increm. is not checked)</li>
|
||
<li> <b>Coordinate Z :</b> Move the copy to the Coordinate Z selected (Base 0,0,0 if Increm. is not checked)</li></ul>
|
||
<ul><li> <b>Rotation</b></li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">...</span> :</b> This button align the Pitch and Roll values on the value of Yaw to have the same values Rotation (or manually)<br />Two click reset the rotations values to 0.0 </li>
|
||
<li> <b>Yaw (Z )  :</b> Rotate the copy to the axis Z (Yaw) (Begin 0 if Increm. is not checked)</li>
|
||
<li> <b>Pitch ( Y ) :</b> Rotate the copy to the axis Y (Pitch) (Begin 0 if Increm. is not checked)</li>
|
||
<li> <b>Roll ( X )  :</b> Rotate the copy to the axis X (Roll) (Begin 0 if Increm. is not checked)</li></ul>
|
||
<ul><li> <b>Scale predefined</b></li>
|
||
<li> <b>Scale predefined :</b> predefined scales in units, km, hm, dam, m, dm, cm, <b>mm</b>, µm, nm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique or choose a free value in the Scale free field.</li></ul>
|
||
<ul><li> <b>Number copy </b></li>
|
||
<li> <b>Number copy :</b> number of copies</li></ul>
|
||
<ul><li> <b>Scale free</b></li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">...</span> :</b> This button align the Scales values on the value of Scale X to have the same values XYZ (or manually)<br />Two click reset the scales values to 1.0 </li>
|
||
<li> <b>Scale X :</b> free scale , if the value is negative <b>( -10)</b> , the object is scaled <b>x 10</b> and will be reversed in the X axis, to reduce the shape give a decimal value <b>(0,5)</b></li>
|
||
<li> <b>Scale Y :</b> free scale , if the value is negative <b>( -10)</b> , the object is scaled <b>x 10</b> and will be reversed in the Y axis, to reduce the shape give a decimal value <b>(0,5)</b></li>
|
||
<li> <b>Scale Z :</b> free scale , if the value is negative <b>( -10)</b> , the object is scaled <b>x 10</b> and will be reversed in the Z axis, to reduce the shape give a decimal value <b>(0,5)</b></li></ul>
|
||
<ul><li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">ValueAt()</span> :</b> Give the valueAt() the subObject selected Face, Wire, Line ...<br />This option is useful in case a compound Placement information [0,0,0] and its real location is away from the base coordinates 0,0,0 (gives no provide information about the rotation of the object)</li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Ok</span> :</b> the OK button validates and launches the command, if no object is selected the <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Ok</span> button will be coloured in red</li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Reset</span> :</b> the Reset button puts all the values to zero</li>
|
||
<li> <b><span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">Quit</span> :</b> the Quit button exit the macro</li></ul>
|
||
<div style="clear:both"></div>
|
||
<p><br />
|
||
</p>
|
||
<h2><span class="mw-headline" id="Script">Script</span></h2>
|
||
<p>The icon <a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_CloneConvert.png" class="image"><img alt="Macro CloneConvert.png" src="Macro_CloneConvert.png" width="64" height="64" /></a>
|
||
</p><p><b>Macro_CloneConvert.FCMacro</b>
|
||
</p><p>Download the macro to Gist <a rel="nofollow" class="external text" href="https://gist.github.com/mario52a/9f2f2f6144e1307a048f1840ef99300c">Macro_CloneConvert.FCMacro</a>
|
||
</p>
|
||
<h2><span class="mw-headline" id="Revision">Revision</span></h2>
|
||
<p>30/03/2018 ver 0.11 = odd checkBox, if multi selection the clone are object unique or object separate
|
||
</p><p>07/06/2017 ver 0.10 = replace Draft...Copy to Part..Shape cause section Copy : not draw copy scaled of object but copy not scaled ??
|
||
</p><p>14/06/2016 ver 0.9 = adding the choice of number of copies and labels optimization
|
||
</p><p>31/01/2016 ver 0.8 = modify the buttons reset section for two click for reset (in case modification the value)
|
||
</p><p>30/01/2016 ver 0.7 = rewriting code with Placement and Increment and adding buttons Compound, Increment, ValueAt(),
|
||
</p><p>26/01/2016 ver 0.6 = correction placement with many objets Copy
|
||
</p><p>26/07/2015 ver 0.5 = correction rotate many objects Function Copy
|
||
</p><p>25/07/2015 ver 0.4 = adding rotation
|
||
</p><p>11/08/2014 replace "AttributeError" to "Exception"
|
||
</p><p>02/07/2014 ver. 0.3 = modified to operate PyQt4 and PySide
|
||
</p><p>09/05/2014 ver. 0.2 = adding function "Copy"
|
||
</p>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div><div class="printfooter">
|
||
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Macro_CloneConvert/de&oldid=271171">http://www.freecadweb.org/wiki/index.php?title=Macro_CloneConvert/de&oldid=271171</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> |