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

98 lines
6.8 KiB
HTML

<html><head><title>TechDraw NewDraft</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>TechDraw NewDraft</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="TechDraw_NewDraft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:TechDraw_NewDraft.png" class="image"><img alt="TechDraw NewDraft.png" src="32px-TechDraw_NewDraft.png" width="32" height="32" srcset="/wiki/images/thumb/9/94/TechDraw_NewDraft.png/48px-TechDraw_NewDraft.png 1.5x, /wiki/images/9/94/TechDraw_NewDraft.png 2x" /></a> TechDraw NewDraft</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Menu location
</th></tr>
<tr>
<td class="ctEven">TechDraw → DraftView
</td></tr>
<tr>
<th class="ctOdd">Workbenches
</th></tr>
<tr>
<td class="ctEven"><a href="TechDraw_Module.html" title="TechDraw Module">TechDraw</a>
</td></tr>
<tr>
<th class="ctOdd">Default shortcut
</th></tr>
<tr>
<td class="ctEven">
</td></tr>
<tr>
<th class="ctOdd">See also
</th></tr>
<tr>
<td class="ctEven">
</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="#TechDraw_NewDraft"><span class="tocnumber">1</span> <span class="toctext">TechDraw NewDraft</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="#Notes"><span class="tocnumber">7</span> <span class="toctext">Notes</span></a></li>
</ul>
</div>
</td></tr></table>
<p><br />
</p>
<h2><span class="mw-headline" id="Description">Description</span></h2>
<p>The DraftView tool inserts a view of a selected <a href="Part_Module.html" title="Part Module">Part</a>-based or Group object into a drawing page. Unlike the standard <a href="TechDraw_NewView.html" title="TechDraw NewView">View</a> tool, views created with this tool are handled by the <a href="Draft_Workbench.html" class="mw-redirect" title="Draft Workbench">Draft Workbench</a>, and specially designed for showing 2D objects. See Notes.
</p>
<div class="center"><div class="floatnone"><a href="https://www.freecadweb.org/wiki/index.php?title=File:DraftViewSample.png" class="image"><img alt="DraftViewSample.png" src="DraftViewSample.png" width="200" height="220" /></a></div></div>
<h2><span class="mw-headline" id="How_to_use">How to use</span></h2>
<ol><li> Select a draft object in the 3D view or in the tree</li>
<li> If you have multiple drawing pages in your document, you will need to select the desired page in the tree.</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:TechDraw_NewDraft.png" class="image"><img alt="TechDraw NewDraft.png" src="24px-TechDraw_NewDraft.png" width="24" height="24" srcset="/wiki/images/thumb/9/94/TechDraw_NewDraft.png/36px-TechDraw_NewDraft.png 1.5x, /wiki/images/thumb/9/94/TechDraw_NewDraft.png/48px-TechDraw_NewDraft.png 2x" /></a> <a class="mw-selflink selflink">DraftView</a></span> button</li>
<li> A view of the draft object will appear on the page.</li></ol>
<h2><span class="mw-headline" id="Options">Options</span></h2>
<ul><li> Creating a Draft View of a group will recursively handle all the objects found into that group and in its subgroups. The View is updated automatically when the contents of the group changes</li>
<li> There is no hidden line removal. Each face found in the handled object(s) will simply be projected along the Direction vector, no specific action is taken when faces overlap</li>
<li> The Draft View also supports all Draft objects that are not Part-based, such as dimensions and texts</li>
<li> Color, line width and line pattern can be specified in the properties. Line patterns can be fine-tuned by directly giving a <a rel="nofollow" class="external text" href="https://www.w3.org/TR/SVG/painting.html#StrokeProperties">stroke-dasharray</a> value, such as 3,5</li>
<li> Projected faces are filled with the face color</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>Source</b>: The draft object to be displayed</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>LineWidth</b>: The width of the lines, independently of the scale</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>FontSize</b>: The size of all texts appearing in this view (texts and dimensions)</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Direction</b>: The projection direction to use</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>Color</b>: The color of lines</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>LineStyle</b>: A line style to use for this view. Can be Solid, Dashed, Dashdot, Dot or a SVG line pattern like 0.20,0.20</li>
<li> <span style="font-size: 0.6em;padding-right:10px;">DATA</span><b>LineSpacing</b>: The spacing to use between lines of texts for multiline texts</li></ul>
<p>Note: DraftView inherits all applicable basic View properties.
</p>
<h2><span class="mw-headline" id="Scripting">Scripting</span></h2>
<p>DraftViews can be added to Pages using Python.
</p>
<pre>dv = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewDraft','TestDraft')
dv.Source = myDraftbject
rc = page.addView(dv) </pre>
<h2><span class="mw-headline" id="Notes">Notes</span></h2>
<p>Since the DraftView is rendered within the Draft Module, TechDraw has limited control over it's appearance. You may need to make changes within Draft to get the representation you want.
</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=TechDraw_NewDraft&amp;oldid=254909">http://www.freecadweb.org/wiki/index.php?title=TechDraw_NewDraft&amp;oldid=254909</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>