114 lines
9.1 KiB
HTML
114 lines
9.1 KiB
HTML
<html><head><title>Draft Label</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 Label</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" >
|
|
<tr>
|
|
<td class="ctTitle">
|
|
<h3><span class="mw-headline" id="Draft_Label"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Draft_Label.png" class="image"><img alt="Draft Label.png" src="32px-Draft_Label.png" width="32" height="32" srcset="/wiki/images/thumb/8/82/Draft_Label.png/48px-Draft_Label.png 1.5x, /wiki/images/8/82/Draft_Label.png 2x" /></a> Draft Label</span></h3>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Menu location
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven">Draft → Label
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Workbenches
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="Draft_Module.html" title="Draft Module">Draft</a>, <a href="Arch_Module.html" title="Arch Module">Arch</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Default shortcut
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven">D L
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">See also
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven">None
|
|
</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_Label"><span class="tocnumber">1</span> <span class="toctext">Draft Label</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="#Label_types"><span class="tocnumber">6</span> <span class="toctext">Label types</span></a></li>
|
|
<li class="toclevel-1 tocsection-6"><a href="#Scripting"><span class="tocnumber">7</span> <span class="toctext">Scripting</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</td></tr></table>
|
|
<p><br />
|
|
</p>
|
|
<h2><span class="mw-headline" id="Description">Description</span></h2>
|
|
<p>This tool inserts a label, which is a piece of text with a 2-segment line and an arrow, in the active document. If an object or a sub-element (face, edge or vertex) is selected when starting the command, the Label can be made to automatically display a certain attribute of the selected element.
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Draft_Label_example.jpg" class="image"><img alt="Draft Label example.jpg" src="400px-Draft_Label_example.jpg" width="400" height="210" srcset="/wiki/images/thumb/8/81/Draft_Label_example.jpg/600px-Draft_Label_example.jpg 1.5x, /wiki/images/thumb/8/81/Draft_Label_example.jpg/800px-Draft_Label_example.jpg 2x" /></a>
|
|
</p>
|
|
<h2><span class="mw-headline" id="How_to_use">How to use</span></h2>
|
|
<ol><li> Optionally, select an object or a subelement of an object (Vertex, edge or face)</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_Label.png" class="image"><img alt="Draft Label.png" src="16px-Draft_Label.png" width="16" height="16" srcset="/wiki/images/thumb/8/82/Draft_Label.png/24px-Draft_Label.png 1.5x, 32px-Draft_Label.png 2x" /></a> <a class="mw-selflink selflink">Draft Label</a></span> button, or press <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">D</span> then <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">L</span> keys</li>
|
|
<li> Click a first point on the 3D view, or type a <a href="Draft_Coordinates.html" title="Draft Coordinates">coordinate</a>, to indicate the target point (arrow position). This can be anywhere, it doesn't need to be exactly on the selected element</li>
|
|
<li> Click a second point on the 3D view, or type a <a href="Draft_Coordinates.html" title="Draft Coordinates">coordinate</a>, to indicate the middle point that is the start of the straight segment.</li>
|
|
<li> Click a third point on the 3D view, or type a <a href="Draft_Coordinates.html" title="Draft Coordinates">coordinate</a>, to indicate the position of the text.</li></ol>
|
|
<h2><span class="mw-headline" id="Options">Options</span></h2>
|
|
<ul><li> Pressing <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">CTRL</span> will <a href="Draft_Snap.html" title="Draft Snap">snap</a> your point to available snap locations.</li>
|
|
<li> To enter coordinates manually, simply enter the numbers, then press <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">ENTER</span> between each X, Y and Z component.</li>
|
|
<li> Pressing <span style="background: #DDDDDD; border: 1px solid #888888; padding: 0px 5px 1px 5px;">ESC</span> will cancel the operation.</li>
|
|
<li> The direction of the straight segment (right or left) will automatically justify the text left or right.</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>Label Type</b>: The type of information shown by this label (see below)</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Custom Text</b>: The text to display when Label Type is set to custom</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Placement</b>: Indicates the rotation and the position of the text</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Straight Distance</b>: The length of the straight segment</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Straight Direction</b>: The direction of the straight segment Horizontal or vertical</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Target Point</b>: The point indicated by this label</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Text Size</b>: The size of the text</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Text Font</b>: The font used for the text</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Text Alignment</b>: The vertical alignment of the text: Top, middle or bottom</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Text Color</b>: The color of the text</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Line Width</b>: The width of the line</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Line Color</b>: The color of the line</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Arrow Type</b>: The type of the arrow: Dot, circle, arrow or tick.</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Arrow Size</b>: The size of the arrow</li>
|
|
<li> <span style="font-size: 0.6em;padding-right:10px;">VIEW</span><b>Frame</b>: Draws a frame around the text</li></ul>
|
|
<h2><span class="mw-headline" id="Label_types">Label types</span></h2>
|
|
<ul><li> <b>Custom</b>: Shows the contents of the Custom Text property</li>
|
|
<li> <b>Name</b>: Shows the name of the target object</li>
|
|
<li> <b>Label</b>: Shows the label of the target object</li>
|
|
<li> <b>Position</b>: Shows the coordinates of the target object (Placement base point), or the coordinates of the target vertex, if applicable, or the coordinates of the center of the target subelement (center of mass) </li>
|
|
<li> <b>Length</b>: Shows the length of the target subelement, if possible</li>
|
|
<li> <b>Area</b>: Shows the area of the target subelement, if possible</li>
|
|
<li> <b>Volume</b>: Shows the volume of the target object, if possible</li>
|
|
<li> <b>Tag</b>: Shows the tag value of the target object, if the target object has such property (which is the case of all Arch objects)</li>
|
|
<li> <b>Material</b>: Shows the label of the material of the target object, if the target object has such property</li></ul>
|
|
<h2><span class="mw-headline" id="Scripting">Scripting</span></h2>
|
|
<p>The Text 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>makeLabel(targetpoint=None,target=None,direction=None,distance=None,labeltype=None,placement=None) </pre>
|
|
<ul><li> Returns the newly created object.</li></ul>
|
|
<p>Example:
|
|
</p>
|
|
<pre>import FreeCAD,Draft
|
|
selection = FreeCADGui.Selection.getSelectionEx()[0]
|
|
Draft.makeLabel(FreeCAD.Vector(10,-10,0),selection,"Horizontal",20,"Label") </pre>
|
|
<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=Draft_Label&oldid=243267">http://www.freecadweb.org/wiki/index.php?title=Draft_Label&oldid=243267</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> |