Шаблоны TechDraw
Обзор
Every TechDraw page is based on a Template object. The Template provides an area in the page background to insert views, symbols, and other annotation objects, and defines its paper size. Only elements within the drawing area will be rendered for export or printing.
The Template can also hold graphics like a frame defining the drawing area including index fields, folding marks, and optionally a title block that in turn contains fixed and editable texts. The title block can also be inserted separately as a symbol.
Templates, like symbols, are SVG files which can be created and modified outside of FreeCAD, either with an application such as Inkscape, or with a simple text editor. Both can contain editable text fields but they use different edit tools.
A new autofill tool (introduced in 1.0) can automatically fill editable text fields in a template when it is inserted. This requires templates that use the new freecad:autofill attribute. The following attribute names are valid for autofill: "author", "date", "organization", "scale", "sheet", "title", "page_number", and "page_count".
Свойства
See also: Property View.
A Template object has the following properties:
Base
- ДанныеOrientation (
Enumeration):PortraitorLandscape.
Page Properties
- ДанныеWidth (
Length): Paper width in mm. - ДанныеHeight (
Length): Paper height in mm. - Данные (Hidden)Editable Texts (
Map): Key:Value list of editable texts in the template.
Template
- ДанныеPage Result (
FileIncluded): A copy of the original Template file including all changes to editable texts. This allows users who may not have a copy of the Template file to see the Page as intended. Not typically useful for end users. - ДанныеTemplate (
File): A pointer to the copy of the original Template file which is incorporated into this *.FCStd file, or a filepath to a template accessible on the current machine. See the next paragraph for information on how to change the Template.
Select a different template file
To select a different template for a drawing:
- Locate the desired Page object in the Tree View.
- Expand the Page node if necessary.
- Select the Template object.
- In the Property View click in the ДанныеTemplate property field.
- Press the … (ellipsis) button that appears.
- A file dialog opens the folder the current template is located in. If the Page was created in the current FreeCAD session this will be the default template folder (as set in the TechDraw Preferences).
- Optionally browse to another folder.
- Select a different template file.
- Press the OK button.
If you have modified a template file and want to update a Page created in the current FreeCAD session that uses this template, temporarily select a different file first, and then select the modified file again.
Custom Templates
A limited number of pre-formatted templates in various standard page sizes are included with FreeCAD. These are found in
$INSTALL_DIR/Mod/TechDraw/Templates/
Where $INSTALL_DIR is the directory where FreeCAD was installed, for example
/usr/share/freecad/Mod/TechDraw/Templates/
Custom templates can also be specified as a default in the TechDraw Preferences.
See also How to make a custom TechDraw template, or, if you prefer script generated templates, TechDraw TemplateGenerator and Macro TemplateHelper.
Примечания
- The library FreeCAD uses to process SVG only supports the svg-tiny specification. In particular: "SVG Tiny does not support gradients, transparency, clipping, masks, symbols, patterns, underline text, strike through text, vertical text, or SVG filter effects." (from Adobe Illustrator Help). Using these features in your custom template will cause problems in rendering.
- Svg transform clauses may cause problems in custom templates. See a Stackoverflow discussion on removing transform clauses in SVG files, especially if Inkscape used too many of them. But they can't be avoided if you need rotated text in your template.
- The xml:space="preserve" clause sometimes causes problems with text size and positioning. It is best to avoid/remove this clause from your custom template's SVG code.
- Templates work best when they contain no extraneous SVG code (called "garbage SVG" by some). There is a good article on removing garbage from SVG here. The article is in Russian.
- Page: New Page, New Page From Template, Update Template Fields, Redraw Page, Print All Pages, Export Page as SVG, Export Page as DXF
- TechDraw Views: New View, Broken View, Section View, Complex Section View, Detail View, Projection Group, Clip Group, Insert SVG, Bitmap Image, Share View, Project Shape
- Views From Other Workbenches: Active View, Draft View, BIM View, Spreadsheet View
- Dimensions: Dimension, Length Dimension, Horizontal Length Dimension, Vertical Length Dimension, Radius Dimension, Diameter Dimension, Angle Dimension, Angle Dimension From 3 Points, Area Annotation, Horizontal Extent Dimension, Vertical Extent Dimension, Repair Dimension References
- Hatching: Image Hatch, Geometric Hatch
- Symbols: Weld Symbol, Surface Finish Symbol, Hole/Shaft Fit
- Stacking: Stack Top, Stack Bottom, Stack Up, Stack Down
- Attributes/Modifications: Select Line Attributes, Cascade Spacing and Delta Distance, Change Line Attributes, Extend Line, Shorten Line, Toggle View Lock, Position Section View, Align Horizontal Chain Dimensions, Align Vertical Chain Dimensions, Align Oblique Chain Dimensions, Cascade Horizontal Dimensions, Cascade Vertical Dimensions, Cascade Oblique Dimensions, Area Annotation, Arc Length Annotation, Customize Format Label
- Centerlines/Threading: Circle Centerlines, Bolt Circle Centerlines, Cosmetic Thread Hole Side View, Cosmetic Thread Hole Bottom View, Cosmetic Thread Bolt Side View, Cosmetic Thread Bolt Bottom View, Cosmetic Intersection Vertices, Offset Vertex, Cosmetic 1 Point Circle, Cosmetic 2 Point Circle, Cosmetic 3 Point Circle, Cosmetic Arc, Cosmetic Parallel Line, Cosmetic Perpendicular Line
- Format/Organize Dimensions Horizontal Chain Dimension, Vertical Chain Dimension, Oblique Chain Dimension, Horizontal Coordinate Dimension, Vertical Coordinate Dimension, Oblique Coordinate Dimension, Horizontal Chamfer Dimension, Vertical Chamfer Dimension, Arc Length Dimension, Insert '⌀' Prefix, Insert '□' Prefix, Insert 'n×' Prefix, Remove Prefix, Increase Decimal Places, Decrease Decimal Places
- Annotations: Text Annotation, Rich Text Annotation, Balloon Annotation, Axonometric Length Dimension
- Add Lines: Leader Line, Centerline on Face, Centerline Between 2 Lines, Centerline Between 2 Points, Cosmetic Line Through 2 points, Edit Line Appearance, Toggle Edge Visibility
- Add Vertices: Cosmetic Vertex, Midpoint Vertices, Quadrant Vertices
- Miscellaneous: Remove Cosmetic Object
- Additional: Line Groups, Templates, Hatching, Geometric dimensioning and tolerancing, Preferences
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework