266 lines
22 KiB
HTML
266 lines
22 KiB
HTML
<html><head><title>Drawing Module/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>Drawing Module/de</h1></div>
|
|
|
|
<div id="mw-content-text" lang="de" dir="ltr" class="mw-content-ltr"><hr/>
|
|
<div class="mw-parser-output"></div>
|
|
<div class="mw-translate-fuzzy">
|
|
<p>Das Zeichnungsmodul erlaubt Ihnen, Ihre 3D-Arbeit zu Papier zu bringen. Das bedeutet, gewählte Ansichten von Ihren Modellen in einem 2D-Fenster anzeigen und dieses Fenster in eine Zeichnung einzufügen, zum Beispiel in ein Blatt mit einer Umrandung, einen Titel und Ihrem Logo und druckt schließlich das Blatt. Das Zeichnungsmodul wird zurzeit noch bearbeitet und ist mehr oder weniger eine Technologievorschau!
|
|
</p>
|
|
</div>
|
|
<div id="itsfree" style="text-align:center;color:black;background:#FDE0A8;margin:1em 7em;padding:0.5em 2em;border:2px solid #FF5706;">Development of the Drawing Module has stopped, and a new <a href="TechDraw_Module.html" title="TechDraw Module">TechDraw Module</a> aiming to replace it will be introduced in version 0.17. Both modules will be provided in v0.17, but the Drawing module may be removed in future releases.</div>
|
|
<p><br />
|
|
</p>
|
|
<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
|
<ul>
|
|
<li class="toclevel-1 tocsection-1"><a href="#GUI_Werkzeuge"><span class="tocnumber">1</span> <span class="toctext">GUI Werkzeuge</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#Scripting"><span class="tocnumber">2</span> <span class="toctext">Scripting</span></a>
|
|
<ul>
|
|
<li class="toclevel-2 tocsection-3"><a href="#Einfaches_Beispiel"><span class="tocnumber">2.1</span> <span class="toctext">Einfaches Beispiel</span></a></li>
|
|
<li class="toclevel-2 tocsection-4"><a href="#Der_parametrische_Weg"><span class="tocnumber">2.2</span> <span class="toctext">Der parametrische Weg</span></a></li>
|
|
<li class="toclevel-2 tocsection-5"><a href="#Zugriff_auf_die_Bits_und_St.C3.BCcke"><span class="tocnumber">2.3</span> <span class="toctext">Zugriff auf die Bits und Stücke</span></a></li>
|
|
<li class="toclevel-2 tocsection-6"><a href="#General_Dimensioning_and_Tolerancing"><span class="tocnumber">2.4</span> <span class="toctext">General Dimensioning and Tolerancing</span></a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toclevel-1 tocsection-7"><a href="#Vorlagen"><span class="tocnumber">3</span> <span class="toctext">Vorlagen</span></a></li>
|
|
<li class="toclevel-1 tocsection-8"><a href="#Extending_the_Drawing_Module"><span class="tocnumber">4</span> <span class="toctext">Extending the Drawing Module</span></a></li>
|
|
<li class="toclevel-1 tocsection-9"><a href="#Tutorials"><span class="tocnumber">5</span> <span class="toctext">Tutorials</span></a></li>
|
|
<li class="toclevel-1 tocsection-10"><a href="#External_links"><span class="tocnumber">6</span> <span class="toctext">External links</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<h3><span class="mw-headline" id="GUI_Werkzeuge">GUI Werkzeuge</span></h3>
|
|
<p>Diese Werkzeuge ermöglichen das Erstellen, Konfigurieren und exportieren von 2D-Zeichnungen
|
|
</p>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_New.png" class="image"><img alt="Drawing New.png" src="32px-Drawing_New.png" width="32" height="32" srcset="/wiki/images/thumb/d/dc/Drawing_New.png/48px-Drawing_New.png 1.5x, /wiki/images/d/dc/Drawing_New.png 2x" /></a> <a href="Drawing_Open_SVG.html" title="Drawing Open SVG">Open scalable vector graphic</a>: Opens a drawing sheet previously saved as an SVG file</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Landscape_A3.png" class="image"><img alt="Drawing Landscape A3.png" src="32px-Drawing_Landscape_A3.png" width="32" height="32" srcset="/wiki/images/thumb/2/27/Drawing_Landscape_A3.png/48px-Drawing_Landscape_A3.png 1.5x, /wiki/images/2/27/Drawing_Landscape_A3.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Landscape_A3/de" title="Drawing Landscape A3/de">Neue A3-Zeichnung</a>: Erzeugt ein neues Zeichnungs-Blatt aus FreeCAD's Standard A3 Vorlage</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_View.png" class="image"><img alt="Drawing View.png" src="32px-Drawing_View.png" width="32" height="32" srcset="/wiki/images/thumb/0/03/Drawing_View.png/48px-Drawing_View.png 1.5x, /wiki/images/0/03/Drawing_View.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_View/de" title="Drawing View/de">Ansicht einfügen</a>: Fügt eine/weitere Ansicht des ausgewählten Objekts in das aktive Zeichnungs-Blatt ein</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Annotation.png" class="image"><img alt="Drawing Annotation.png" src="32px-Drawing_Annotation.png" width="32" height="32" srcset="/wiki/images/thumb/7/74/Drawing_Annotation.png/48px-Drawing_Annotation.png 1.5x, /wiki/images/7/74/Drawing_Annotation.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Annotation/de&action=edit&redlink=1" class="new" title="Drawing Annotation/de (page does not exist)">Anmerkung einfügen</a>: Fügt eine Anmerkung in die aktive Zeichnung ein</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Clip.png" class="image"><img alt="Drawing Clip.png" src="32px-Drawing_Clip.png" width="32" height="32" srcset="/wiki/images/thumb/b/b9/Drawing_Clip.png/48px-Drawing_Clip.png 1.5x, /wiki/images/b/b9/Drawing_Clip.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Clip/de&action=edit&redlink=1" class="new" title="Drawing Clip/de (page does not exist)">Ausschnitt</a>: Fügt eine Ausschnittsgruppe in die aktive Zeichnung ein</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Openbrowser.png" class="image"><img alt="Drawing Openbrowser.png" src="32px-Drawing_Openbrowser.png" width="32" height="32" srcset="/wiki/images/thumb/0/02/Drawing_Openbrowser.png/48px-Drawing_Openbrowser.png 1.5x, /wiki/images/0/02/Drawing_Openbrowser.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Openbrowser/de&action=edit&redlink=1" class="new" title="Drawing Openbrowser/de (page does not exist)">Browseransicht</a>: Öffnet die angewählte Seite in der Browseransicht</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Orthoviews.png" class="image"><img alt="Drawing Orthoviews.png" src="32px-Drawing_Orthoviews.png" width="32" height="32" srcset="/wiki/images/thumb/7/7f/Drawing_Orthoviews.png/48px-Drawing_Orthoviews.png 1.5x, /wiki/images/7/7f/Drawing_Orthoviews.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Orthoviews/de" title="Drawing Orthoviews/de">Orthografische Ansichten einfügen</a>: Orthografische Projektion eines Bauteils in die aktive Zeichnung einfügen</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Symbol.png" class="image"><img alt="Drawing Symbol.png" src="32px-Drawing_Symbol.png" width="32" height="32" srcset="/wiki/images/thumb/0/0a/Drawing_Symbol.png/48px-Drawing_Symbol.png 1.5x, /wiki/images/0/0a/Drawing_Symbol.png 2x" /></a> <a href="Drawing_Symbol.html" title="Drawing Symbol">Symbol</a>: Adds the contents of a SVG file as a symbol on the current drawing sheet</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_DraftView.png" class="image"><img alt="Drawing DraftView.png" src="32px-Drawing_DraftView.png" width="32" height="32" srcset="/wiki/images/thumb/f/ff/Drawing_DraftView.png/48px-Drawing_DraftView.png 1.5x, /wiki/images/f/ff/Drawing_DraftView.png 2x" /></a> <a href="Draft_Drawing.html" title="Draft Drawing">Draft View</a>: Inserts a special Draft view of the selected object in the current drawing sheet</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_SpreadsheetView.png" class="image"><img alt="Drawing SpreadsheetView.png" src="32px-Drawing_SpreadsheetView.png" width="32" height="32" srcset="/wiki/images/thumb/2/2f/Drawing_SpreadsheetView.png/48px-Drawing_SpreadsheetView.png 1.5x, /wiki/images/2/2f/Drawing_SpreadsheetView.png 2x" /></a> <a href="Drawing_SpreadsheetView.html" title="Drawing SpreadsheetView">Spreadsheet View</a>: Inserts a view of a selected spreadsheet in the current drawing sheet</li></ul>
|
|
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_Save.png" class="image"><img alt="Drawing Save.png" src="32px-Drawing_Save.png" width="32" height="32" srcset="/wiki/images/4/43/Drawing_Save.png 1.5x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Save/de&action=edit&redlink=1" class="new" title="Drawing Save/de (page does not exist)">Speichern</a>: Speichert das aktuelle Blatt als SVG-Datei</li></ul>
|
|
<ul><li> <a href="Drawing_ProjectShape.html" title="Drawing ProjectShape">Project Shape</a>: Creates a projection of the selected object (Source) in the 3D view.</li></ul>
|
|
<p><b>Note</b>
|
|
The <a href="Draft_Drawing.html" title="Draft Drawing">Draft View</a> tool is used mainly to place Draft objects on paper. It has a couple of extra capabilities over the standard Drawing tools, and supports specific objects like <a href="Draft_Dimension.html" title="Draft Dimension">Draft dimensions</a>.
|
|
</p><p><br />
|
|
<a href="https://www.freecadweb.org/wiki/index.php?title=File:Drawing_extraction.png" class="image"><img alt="Drawing extraction.png" src="800px-Drawing_extraction.png" width="800" height="428" srcset="/wiki/images/thumb/f/f4/Drawing_extraction.png/1200px-Drawing_extraction.png 1.5x, /wiki/images/f/f4/Drawing_extraction.png 2x" /></a>
|
|
</p><p>In diesem Bild sehen Sie die wichtigsten Konzepte des Zeichnungs-Modul. Das Dokument enthält einen Gestalt-Gegenstand (Schenkel), den wir zu einer Zeichnung herausziehen wollen. Deshalb wird eine "Seite" erstellt. Eine Seite wird durch eine Schablone, in diesem Fall die "A3_Landscape" Schablone realisiert. Die Vorlage ist ein SVG-Dokument, das Ihre üblichen Blatt-Rahmen und Ihr Logo beinhaltet, oder Ihre Präsentations-Standards erfüllt.
|
|
</p><p>In diese Seite können wir eine oder mehrere Ansichten einfügen. Jede Ansicht hat eine Position auf der Seite (Eigenschaften X, Y), einen Skalen-Faktor (Eigene Skalierung) und zusätzliche Eigenschaften. Jedes Mal, wenn sich die Seite oder die Ansicht oder das referenzierte Objekt ändert, wird die Seite regeneriert, und die Seitenanzeige aktualisiert.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Scripting">Scripting</span></h2>
|
|
<p>Im Moment der Endbenutzer(GUI)-Arbeitsablauf sehr beschränkt, somit ist die Scripting-API interessanter. Hier folgen Beispiele darzu, wie man die Scripting-API des Zeichnungsmoduls verwendet.
|
|
</p><p>Here a script that can easily fill the <a href="Macro_CartoucheFC.html" title="Macro CartoucheFC">Macro_CartoucheFC</a> leaf FreeCAD A3_Landscape.
|
|
</p>
|
|
<h3><span class="mw-headline" id="Einfaches_Beispiel">Einfaches Beispiel</span></h3>
|
|
<p>Zuallererst brauchen Sie das Part- und das Zeichnungsmodul:
|
|
</p>
|
|
<pre>import FreeCAD, Part, Drawing </pre>
|
|
<p>Erstellen Sie ein kleines Beispiel-Teil
|
|
</p>
|
|
<pre>Part.show(Part.makeBox(100,100,100).cut(Part.makeCylinder(80,100)).cut(Part.makeBox(90,40,100)).cut(Part.makeBox(20,85,100))) </pre>
|
|
<p>Direkte Projektion. Das G0 bedeutet harte Kante, der G1 ist dauernde Tangente.
|
|
</p>
|
|
<pre>Shape = App.ActiveDocument.Shape.Shape
|
|
[visibleG0,visibleG1,hiddenG0,hiddenG1] = Drawing.project(Shape)
|
|
print "visible edges:", len(visibleG0.Edges)
|
|
print "hidden edges:", len(hiddenG0.Edges) </pre>
|
|
<p>Alles wird auf der Z-Ebene projiziert:
|
|
</p>
|
|
<pre>print "Bnd Box shape: X=",Shape.BoundBox.XLength," Y=",Shape.BoundBox.YLength," Z=",Shape.BoundBox.ZLength
|
|
print "Bnd Box project: X=",visibleG0.BoundBox.XLength," Y=",visibleG0.BoundBox.YLength," Z=",visibleG0.BoundBox.ZLength </pre>
|
|
<p>Anderer Projektions-Vektor
|
|
</p>
|
|
<pre>[visibleG0,visibleG1,hiddenG0,hiddenG1] = Drawing.project(Shape,App.Vector(1,1,1)) </pre>
|
|
<p>Projekt zu SVG
|
|
</p>
|
|
<pre>resultSVG = Drawing.projectToSVG(Shape,App.Vector(1,1,1))
|
|
print resultSVG </pre>
|
|
<h3><span class="mw-headline" id="Der_parametrische_Weg">Der parametrische Weg</span></h3>
|
|
<p>Erstellen Sie den Körper
|
|
</p>
|
|
<pre>import FreeCAD
|
|
import Part
|
|
import Drawing
|
|
|
|
# Create three boxes and a cylinder
|
|
App.ActiveDocument.addObject("Part::Box","Box")
|
|
App.ActiveDocument.Box.Length=100.00
|
|
App.ActiveDocument.Box.Width=100.00
|
|
App.ActiveDocument.Box.Height=100.00
|
|
|
|
App.ActiveDocument.addObject("Part::Box","Box1")
|
|
App.ActiveDocument.Box1.Length=90.00
|
|
App.ActiveDocument.Box1.Width=40.00
|
|
App.ActiveDocument.Box1.Height=100.00
|
|
|
|
App.ActiveDocument.addObject("Part::Box","Box2")
|
|
App.ActiveDocument.Box2.Length=20.00
|
|
App.ActiveDocument.Box2.Width=85.00
|
|
App.ActiveDocument.Box2.Height=100.00
|
|
|
|
App.ActiveDocument.addObject("Part::Cylinder","Cylinder")
|
|
App.ActiveDocument.Cylinder.Radius=80.00
|
|
App.ActiveDocument.Cylinder.Height=100.00
|
|
App.ActiveDocument.Cylinder.Angle=360.00
|
|
# Fuse two boxes and the cylinder
|
|
App.ActiveDocument.addObject("Part::Fuse","Fusion")
|
|
App.ActiveDocument.Fusion.Base = App.ActiveDocument.Cylinder
|
|
App.ActiveDocument.Fusion.Tool = App.ActiveDocument.Box1
|
|
|
|
App.ActiveDocument.addObject("Part::Fuse","Fusion1")
|
|
App.ActiveDocument.Fusion1.Base = App.ActiveDocument.Box2
|
|
App.ActiveDocument.Fusion1.Tool = App.ActiveDocument.Fusion
|
|
# Cut the fused shapes from the first box
|
|
App.ActiveDocument.addObject("Part::Cut","Shape")
|
|
App.ActiveDocument.Shape.Base = App.ActiveDocument.Box
|
|
App.ActiveDocument.Shape.Tool = App.ActiveDocument.Fusion1
|
|
# Hide all the intermediate shapes
|
|
Gui.ActiveDocument.Box.Visibility=False
|
|
Gui.ActiveDocument.Box1.Visibility=False
|
|
Gui.ActiveDocument.Box2.Visibility=False
|
|
Gui.ActiveDocument.Cylinder.Visibility=False
|
|
Gui.ActiveDocument.Fusion.Visibility=False
|
|
Gui.ActiveDocument.Fusion1.Visibility=False </pre>
|
|
<p>Fügen Sie einen Seitenobjekt ein und weisen Sie eine Schablone zu
|
|
</p>
|
|
<pre>App.ActiveDocument.addObject('Drawing::FeaturePage','Page')
|
|
App.ActiveDocument.Page.Template = App.getResourceDir()+'Mod/Drawing/Templates/A3_Landscape.svg' </pre>
|
|
<p>Erstellen Sie Sicht auf das "Shape"-Objekt, die Position und Größe und weisen Sie es einer Seite zu
|
|
</p>
|
|
<pre>App.ActiveDocument.addObject('Drawing::FeatureViewPart','View')
|
|
App.ActiveDocument.View.Source = App.ActiveDocument.Shape
|
|
App.ActiveDocument.View.Direction = (0.0,0.0,1.0)
|
|
App.ActiveDocument.View.X = 10.0
|
|
App.ActiveDocument.View.Y = 10.0
|
|
App.ActiveDocument.Page.addObject(App.ActiveDocument.View) </pre>
|
|
<p>Erstellen Sie eine zweite Ansicht auf denselben Gegenstand, aber dieses Mal wird die Ansicht um 90Grad rotieret.
|
|
</p>
|
|
<pre>App.ActiveDocument.addObject('Drawing::FeatureViewPart','ViewRot')
|
|
App.ActiveDocument.ViewRot.Source = App.ActiveDocument.Shape
|
|
App.ActiveDocument.ViewRot.Direction = (0.0,0.0,1.0)
|
|
App.ActiveDocument.ViewRot.X = 290.0
|
|
App.ActiveDocument.ViewRot.Y = 30.0
|
|
App.ActiveDocument.ViewRot.Scale = 1.0
|
|
App.ActiveDocument.ViewRot.Rotation = 90.0
|
|
App.ActiveDocument.Page.addObject(App.ActiveDocument.ViewRot) </pre>
|
|
<p>Erstellen Sie eine dritte Sicht auf das gleiche Objekt, aber mit einer isometrischen Ansichts-Richtung. Die verborgenen Linien sind auch aktiviert.
|
|
</p>
|
|
<pre>App.ActiveDocument.addObject('Drawing::FeatureViewPart','ViewIso')
|
|
App.ActiveDocument.ViewIso.Source = App.ActiveDocument.Shape
|
|
App.ActiveDocument.ViewIso.Direction = (1.0,1.0,1.0)
|
|
App.ActiveDocument.ViewIso.X = 335.0
|
|
App.ActiveDocument.ViewIso.Y = 140.0
|
|
App.ActiveDocument.ViewIso.ShowHiddenLines = True
|
|
App.ActiveDocument.Page.addObject(App.ActiveDocument.ViewIso) </pre>
|
|
<p>Ändern Sie etwas und aktualisieren Sie. Der Aktualisierungsprozess ändert die Ansicht und die Seite.
|
|
</p>
|
|
<pre>App.ActiveDocument.View.X = 30.0
|
|
App.ActiveDocument.View.Y = 30.0
|
|
App.ActiveDocument.View.Scale = 1.5
|
|
App.ActiveDocument.recompute() </pre>
|
|
<h3><span class="mw-headline" id="Zugriff_auf_die_Bits_und_St.C3.BCcke">Zugriff auf die Bits und Stücke</span></h3>
|
|
<p>Holen Sie sich das SVG-Fragment einer einzelnen Ansicht
|
|
</p>
|
|
<pre>ViewSVG = App.ActiveDocument.View.ViewResult
|
|
print ViewSVG </pre>
|
|
<p>Holen Sie sich die ganze Ergebnis-Seite(es ist eine Datei im vorläufigen Verzeichnis des Dokumentes, nur Leserechte)
|
|
</p>
|
|
<pre>print "Resulting SVG document: ",App.ActiveDocument.Page.PageResult
|
|
file = open(App.ActiveDocument.Page.PageResult,"r")
|
|
print "Result page is ",len(file.readlines())," lines long" </pre>
|
|
<p>Wichtig: Geben Sie die Datei frei!
|
|
</p>
|
|
<pre>del file </pre>
|
|
<p>Fügen Sie eine Ansicht mit Ihrem eigenen Inhalt ein:
|
|
</p>
|
|
<pre>App.ActiveDocument.addObject('Drawing::FeatureView','ViewSelf')
|
|
App.ActiveDocument.ViewSelf.ViewResult = """<g id="ViewSelf"
|
|
stroke="rgb(0, 0, 0)"
|
|
stroke-width="0.35"
|
|
stroke-linecap="butt"
|
|
stroke-linejoin="miter"
|
|
transform="translate(30,30)"
|
|
fill="#00cc00"
|
|
>
|
|
|
|
<ellipse cx="40" cy="40" rx="30" ry="15"/>
|
|
</g>"""
|
|
App.ActiveDocument.Page.addObject(App.ActiveDocument.ViewSelf)
|
|
App.ActiveDocument.recompute()
|
|
|
|
del ViewSVG </pre>
|
|
<p>Das führt zu folgendem Ergebnis:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:DrawingScriptResult.jpg" class="image"><img alt="DrawingScriptResult.jpg" src="800px-DrawingScriptResult.jpg" width="800" height="481" srcset="/wiki/images/thumb/2/2e/DrawingScriptResult.jpg/1200px-DrawingScriptResult.jpg 1.5x, /wiki/images/2/2e/DrawingScriptResult.jpg 2x" /></a>
|
|
</p>
|
|
<h3><span class="mw-headline" id="General_Dimensioning_and_Tolerancing">General Dimensioning and Tolerancing</span></h3>
|
|
<p>Drawing dimensions an tolerances are still under development but you can get some basic functionality with a bit of work.
|
|
</p><p>First you need to get the gdtsvg python module from here (WARNING: This could be broken at any time!):
|
|
</p><p><a rel="nofollow" class="external free" href="https://github.com/jcc242/FreeCAD">https://github.com/jcc242/FreeCAD</a>
|
|
</p><p>To get a feature control frame, try out the following:
|
|
</p>
|
|
<pre>import gdtsvg as g # Import the module, I like to give it an easy handle
|
|
ourFrame = g.ControlFrame("0","0", g.Perpendicularity(), ".5", g.Diameter(), g.ModifyingSymbols("M"), "A",
|
|
g.ModifyingSymbols("F"), "B", g.ModifyingSymbols("L"), "C", g.ModifyingSymbols("I")) </pre>
|
|
<p>Here is a good breakdown of the contents of a feature control frame: <a rel="nofollow" class="external free" href="http://www.cadblog.net/adding-geometric-tolerances.htm">http://www.cadblog.net/adding-geometric-tolerances.htm</a>
|
|
</p><p>The parameters to pass to control frame are:
|
|
</p>
|
|
<ol><li>X-coordinate in SVG-coordinate system (type string)</li>
|
|
<li>Y-coordinate in SVG-coordinate system (type string)</li>
|
|
<li>The desired geometric characteristic symbol (tuple, svg string as first, width of symbol as second, height of symbol as third)</li>
|
|
<li>The tolerance (type string)</li>
|
|
<li>(optional) The diameter symbol (tuple, svg string as first, width of symbol as second, height of symbol as third)</li>
|
|
<li>(optional) The condition modifying material (tuple, svg string as first, width of symbol as second, height of symbol as third)</li>
|
|
<li>(optional) The first datum (type string)</li>
|
|
<li>(optional) The first datum's modifying condition (tuple, svg string as first, width of symbol as second, height of symbol as third)</li>
|
|
<li>(optional) The second datum (type string)</li>
|
|
<li>(optional) The second datum's modifying condition (tuple, svg string as first, width of symbol as second, height of symbol as third)</li>
|
|
<li>(optional) The third datum (type string)</li>
|
|
<li>(optional) The third datum's material condition (tuple, svg string as first, width of symbol as second, height of symbol as third)</li></ol>
|
|
<p>The ControlFrame function returns a type containing (svg string, overall width of control frame, overall height of control frame)
|
|
</p><p>To get a dimension, try out the following:
|
|
</p>
|
|
<pre>import gdtsvg
|
|
ourDimension = linearDimension(point1, point2, textpoint, dimensiontext, linestyle=getStyle("visible"),
|
|
arrowstyle=getStyle("filled"), textstyle=getStyle("text") </pre>
|
|
<p>Inputs for linear dimension are:
|
|
</p>
|
|
<ol><li>point1, an (x,y) tuple with svg-coordinates, this is one of the points you would like to dimension between</li>
|
|
<li>point2, an (x,y) tuple with svg-coordinates, this is the second point you would like to dimension between</li>
|
|
<li>textpoint, an (x,y) tuple of svg-coordinates, this is where the text of your dimension will be</li>
|
|
<li>dimensiontext, a string containing the text you want the dimension to say</li>
|
|
<li>linestyle, a string containing svg (i.e. css) styles, using the getStyle function to retrieve a preset string, for styling the how the lines look</li>
|
|
<li>arrowstyle, a string containing svg (i.e. css) styles, using the getStyle function to retrieve a preset string, for styling how the arrows look</li>
|
|
<li>textstyle, a string containing svg (i.e. css) styles, using the getStyle function to retrieve a preset string, for styling how the text looks </li></ol>
|
|
<p>With those two, you can proceed as above for displaying them on the drawing page. This module is very buggy and can be broken at any given moment, bug reports are welcome on the github page for now, or contact jcc242 on the forums if you post a bug somewhere else.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Vorlagen">Vorlagen</span></h2>
|
|
<p>FreeCAD kommt mit einer Reihe von Standard-Templates, mehr darüber finden Sie auf der <a href="Drawing_templates.html" title="Drawing templates">Drawing templates</a>-Seite.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Extending_the_Drawing_Module">Extending the Drawing Module</span></h2>
|
|
<p>Some notes on the programming side of the drawing module will be added to the <a href="Drawing_Documentation.html" title="Drawing Documentation">Drawing Documentation</a> page. This is to help quickly understand how the drawing module works, enabling programmers to rapidly start programming for it.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Tutorials">Tutorials</span></h2>
|
|
<ul><li> <a href="Drawing_tutorial.html" title="Drawing tutorial">Drawing tutorial</a></li></ul>
|
|
<p><br />
|
|
</p>
|
|
<h2><span class="mw-headline" id="External_links">External links</span></h2>
|
|
<ul><li> <a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=1Hm5Zyjmjac">Intro to mechanical drawing on Youtube - by Normal Universe</a></li></ul>
|
|
<p><br />
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Drawing_Module/de&oldid=290053">http://www.freecadweb.org/wiki/index.php?title=Drawing_Module/de&oldid=290053</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> |