TechDraw VorlagenAnleitung
Tutorial |
Topic |
---|
Drafting |
Level |
Intermediate |
Time to complete |
60 minutes |
Authors |
wandererfan |
FreeCAD version |
0.17 |
Example files |
None |
See also |
None |
Einleitung
Dieses Tutorial zeigt die Erstellung einer SVG-Datei, die als Hintergrundvorlage für den TechDraw-Arbeitsbereich verwendet werden kann.
Dieses Tutorial setzt moderate Kenntnisse in Inkscape und SVG sowie in FreeCAD und dem TechDraw-Arbeitsbereich voraus.
Wir erstellen ein einfaches Template für die Papiergröße "US Letter Size" im Querformat.
Eine Kopie des Ergebnisses dieser Übung findet sich in
$INSTALL_DIR/Mod/TechDraw/Templates/HowToExample.svg
wobei $INSTALL_DIR
das Verzeichnis ist, wo FreeCAD installiert wurde, z.B.
/usr/share/freecad/Mod/TechDraw/Templates/HowToExample.svg
Basisdokument erzeugen
1. Öffne ein neues Dokument in Inkscape
2. In den Dokumenteneigenschaften
- wähle ein Papierformat (US Letter) sowie eine Ausrichtung (Querformat)
- stelle die Standardeinheiten und Seitengrösseneinheit auf mm (279.4 x 215.9)
Inskcape: Dokument mit Seitengröße und Ausrichtung
3. Nimm den XML-Editor (Bearbeiten > XML-Editor), um dem svg
-Element einen "freecad"-Namensraum (namespace clause) hinzuzufügen.
xmlns:freecad="http://www.freecadweb.org/wiki/index.php?title=Svg_Namespace"
Inkscape: XML-Editor beim Hinzufügen des "freecad"-Namensraums zum <svg>-Element
Erstelle eine Vorlagenzeichnung
4. Zeichne die Umrisse, Feldnummern, Mittellinien, usw.
5. Zeichne die Beschriftungsfelder
6. Erstelle und positioniere deinen statischen Text
7. Erstelle und positioniere den veränderbaren (dynamischen) Text.
8. Nun solltest du eine Vorlage ähnlich wie diese haben:
Inkscape: Vorläufiger Vorlagenentwurf
Erstelle änderbare Felder
9. Use the XML Editor to add a freecad:editable
tag to each editable <text>
item.
- Assign a meaningful field name to each editable text.
Inkscape: XML Editor adding the "freecad:editable" property to the desired <text> item
Adjust size of the SVG
10. Use the XML editor to adjust the viewBox
attribute to match your page size in millimeters.
- It is four values, in the format
"0 0 width height"
Inkscape: XML Editor adjusting the viewbox to match the page size in millimeters
11. Your template will now appear much bigger than desired.
Inkscape: tentative template layout exceeding the page size
12. We need to shrink it.
- Edit → Select All in All Layers, or box select and select all.
- Adjust the W: and H: spinboxes to match your artwork's size in millimeters.
- Set it to the page size less any applicable margins, for example, W: 250, and H: 200.
13. Use "Align and Distribute" or the X: and Y: spinboxes to position the artwork within the limits of the page if required.
14. Your template should now look right, just like it did in the finished artwork picture above.
Remove transformans on the SVG
15. Ensure that all your editable texts are "ungrouped" with Shift+Ctrl+g.
16. Select everything on your page, Edit → Select All, and then Edit → Copy.
17. Then delete the current layer, Layer → Delete Current Layer.
18. Then paste, Edit → Paste in Place.
19. Your template should now look right and shouldn't have any unwanted transforms.
20. Save your template.
21. Try it in FreeCAD and TechDraw Workbench with TechDraw New Pick.
FreeCAD: finished template with an editable text field being modified
Anmerkungen
Verwende keine Ebenen bevor du es nicht ohne Ebenen beherrscht. Ebenen und Gruppen können unerwünschte Transformationen verursachen.
See a Stackoverflow discussion on removing transform clauses in SVG files.
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub