Draft Drawing: Difference between revisions
m (→Description: lien sur Drawing_templates) |
m (moved templates out of translation tags) |
||
(36 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{GuiCommand|Name=Draft_Drawing|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Drafting -> Drawing}} |
|||
<translate> |
|||
<!--T:19--> |
|||
{{Docnav |
|||
|[[Draft_Clone|Clone]] |
|||
|[[Draft_Mirror|Mirror]] |
|||
|[[Draft_Module|Draft]] |
|||
|IconL=Draft_Clone.svg |
|||
|IconC=Workbench_Draft.svg |
|||
|IconR=Draft_Mirror.svg |
|||
}} |
|||
==Description== |
|||
<!--T:23--> |
|||
This tool allows you to put selected objects on a svg [[Drawing Module|Drawing sheet]]. If no [[Drawing_templates|sheet]] exists in the document, a default one will be created. |
|||
{{VeryImportantMessage|Development of the [[Drawing Workbench|Drawing Workbench]] stopped in FreeCAD 0.16; the new [[TechDraw Workbench|TechDraw Workbench]] aiming to replace it was introduced in v0.17. Both workbenches are still provided in v0.17, but the Drawing Workbench may be removed in future releases.}} |
|||
<!--T:1--> |
|||
[[Image:Draft drawing example.jpg|400px]] |
|||
{{GuiCommand |
|||
|Name=Draft Drawing |
|||
|MenuLocation=Drafting → Drawing |
|||
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]] |
|||
|SeeAlso=[[TechDraw Workbench]], [[Draft Shape2DView]] |
|||
}} |
|||
==Description== <!--T:2--> |
|||
==How to use== |
|||
<!--T:3--> |
|||
# Select the objects you wish to put on a drawing sheet |
|||
The Drawing tool allows you to put selected objects on a drawing sheet created with the [[Drawing Workbench|Drawing Workbench]]. If no [[Drawing templates|sheet]] exists in the document, a default one will be created. |
|||
# Press the {{KEY|[[Image:Draft Drawing.png|16px]] [[Draft Drawing]]}} button |
|||
<!--T:14--> |
|||
==Options== |
|||
This tool works similarly to the [[Drawing View|Drawing View]] tool but is optimized for [[Draft Workbench|Draft Workbench]] objects, and can render 2D objects with a face filling. It can handle specific objects such as [[Draft Dimension|Draft Dimension]] and [[Draft Text|Draft Text]], that the [[Drawing View|Drawing View]] tool cannot handle. |
|||
</translate> |
|||
* Select objects you want to put on the drawing sheet. The tool will work best with flat 2D objects from the [[Draft Module|Draft]] or [[Sketcher Workbench|Sketcher]] modules. |
|||
[[Image:Draft drawing example.jpg|640px]] |
|||
* If the selected object is an [[Arch SectionPlane]], this tool will create an additional view of that section plane. |
|||
<translate> |
|||
* In the same selection, add the page object you want to draw your objects to. If there is no existing page, a new one will be created. If you didn't select a page but there is at least one in the document, the first found one will be used to draw to. |
|||
<!--T:15--> |
|||
* If you selected an existing sheet, and the objects in the selection that are already on that sheet (for ex. for a "Rectangle" object there is already a "ViewRectangle" object on the sheet), they will be substitued. This allows you to simply select all the objects and send them to an existing page, which will simply be updated. |
|||
{{Caption|Draft object and dimensions imported into a Drawing page}} |
|||
==Usage== <!--T:4--> |
|||
==Properties== |
|||
<!--T:5--> |
|||
* {{PropertyData|Fill Style}}: For closed shapes, allows to specify one of the Default Draft fill styles, or use the shape color. |
|||
# Select the objects that you wish to put on a drawing sheet. |
|||
* {{PropertyData|Font Size}}: Allows you to specify the font size of texts and dimensions. |
|||
# In the same selection, add the [[Drawing Workbench|Drawing Workbench]] page object in which you want to draw the projection of the objects. |
|||
# Press the {{Button|[[Image:Draft_Drawing.svg|16px]] [[Draft Drawing|Draft Drawing]]}} button. |
|||
==Notes== <!--T:16--> |
|||
==Scripting== |
|||
* The tool will work best with 2D objects from the [[Draft Workbench|Draft Workbench]] or [[Sketcher Workbench|Sketcher Workbench]]. |
|||
* The selected object can also be an [[Arch SectionPlane|Arch SectionPlane]], which will show the elements viewed by that plane. |
|||
* If there is no existing page, a new one will be created. |
|||
* If no page was selected but there is at least one in the document, the first page found will be used to put the projections. |
|||
* If you select a sheet and the objects already projected on that sheet, the projections will be updated. |
|||
==Options== <!--T:6--> |
|||
The Draft Drawing tool can by used in [[macros]] and from the python console by using the following function: |
|||
<!--T:7--> |
|||
'''makeDrawingView (object,page)''': adds a view of the given object to the given page. Returns the created view object. |
|||
There are no options for this tool. Either it works with the selected objects or not. |
|||
==Properties== <!--T:8--> |
|||
<!--T:9--> |
|||
* {{PropertyData|Fill Style}}: specifies the fill style "concrete", "square", "simple", "wood", "line", "cross", "woodgrain", or "shape color". This property only works for closed shapes. |
|||
* {{PropertyData|Font Size}}: specifies the font size of texts and dimensions. |
|||
* {{PropertyData|Line Width}}: specifies the line width of viewed objects in millimeters. |
|||
==Scripting== <!--T:10--> |
|||
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:11--> |
|||
The Drawing tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
|||
</translate> |
|||
{{Code|code= |
|||
DrawingView = makeDrawingView(obj, page, lwmod=None, tmod=None, otherProjection=None) |
|||
}} |
|||
<translate> |
|||
<!--T:12--> |
|||
* Creates a {{incode|DrawingView}} from {{incode|obj}} in the specified {{incode|page}}. |
|||
* If given, {{incode|lwmod}} modifies line weights in percentage, and {{incode|tmod}} modifies text heights in percentage. |
|||
<!--T:17--> |
|||
The attributes of the view usually need to be modified so that it is displayed correctly in the drawing page. In particular, the position is controlled by {{incode|X}} and {{incode|Y}}, which are given in millimeters, and {{incode|Scale}} is important to correctly fit the projected shape in the page. The scale usually ranges from 1 to 0.25 (1:1 to 1:4) for small solids, and from 0.02 to 0.01 (1:50 to 1:100) for typical architectural elements. |
|||
<!--T:13--> |
|||
Example: |
Example: |
||
</translate> |
|||
import FreeCAD,Draft |
|||
{{Code|code= |
|||
obj = FreeCAD.ActiveDocument.ActiveObject |
|||
import FreeCAD, Draft, Drawing |
|||
Draft.makeDrawingView(obj,page) |
|||
obj = Draft.makePolygon(5, 1000) |
|||
page = FreeCAD.ActiveDocument.addObject('Drawing::FeaturePage', 'Page') |
|||
page.Template = FreeCAD.getResourceDir() + 'Mod/Drawing/Templates/A3_Landscape.svg' |
|||
View = Draft.makeDrawingView(obj, page) |
|||
View.Scale = 0.02 |
|||
FreeCAD.ActiveDocument.recompute() |
|||
View.X = 200 |
|||
View.Y = 150 |
|||
FreeCAD.ActiveDocument.recompute() |
|||
}} |
|||
<translate> |
|||
<!--T:18--> |
|||
{{Docnav |
|||
|[[Draft_Clone|Clone]] |
|||
|[[Draft_Mirror|Mirror]] |
|||
|[[Draft_Module|Draft]] |
|||
|IconL=Draft_Clone.svg |
|||
|IconC=Workbench_Draft.svg |
|||
|IconR=Draft_Mirror.svg |
|||
}} |
|||
</translate> |
|||
{{languages | {{es|Draft Drawing/es}} {{fr|Draft Drawing/fr}} {{it|Draft Drawing/it}} {{se|Draft Drawing/se}} }} |
|||
{{Draft Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{clear}} |
Revision as of 04:58, 21 February 2020
Draft Drawing |
Menu location |
---|
Drafting → Drawing |
Workbenches |
Draft, Arch |
Default shortcut |
None |
Introduced in version |
- |
See also |
TechDraw Workbench, Draft Shape2DView |
Description
The Drawing tool allows you to put selected objects on a drawing sheet created with the Drawing Workbench. If no sheet exists in the document, a default one will be created.
This tool works similarly to the Drawing View tool but is optimized for Draft Workbench objects, and can render 2D objects with a face filling. It can handle specific objects such as Draft Dimension and Draft Text, that the Drawing View tool cannot handle.
Draft object and dimensions imported into a Drawing page
Usage
- Select the objects that you wish to put on a drawing sheet.
- In the same selection, add the Drawing Workbench page object in which you want to draw the projection of the objects.
- Press the Draft Drawing button.
Notes
- The tool will work best with 2D objects from the Draft Workbench or Sketcher Workbench.
- The selected object can also be an Arch SectionPlane, which will show the elements viewed by that plane.
- If there is no existing page, a new one will be created.
- If no page was selected but there is at least one in the document, the first page found will be used to put the projections.
- If you select a sheet and the objects already projected on that sheet, the projections will be updated.
Options
There are no options for this tool. Either it works with the selected objects or not.
Properties
- DataFill Style: specifies the fill style "concrete", "square", "simple", "wood", "line", "cross", "woodgrain", or "shape color". This property only works for closed shapes.
- DataFont Size: specifies the font size of texts and dimensions.
- DataLine Width: specifies the line width of viewed objects in millimeters.
Scripting
See also: Draft API and FreeCAD Scripting Basics.
The Drawing tool can be used in macros and from the Python console by using the following function:
DrawingView = makeDrawingView(obj, page, lwmod=None, tmod=None, otherProjection=None)
- Creates a
DrawingView
fromobj
in the specifiedpage
. - If given,
lwmod
modifies line weights in percentage, andtmod
modifies text heights in percentage.
The attributes of the view usually need to be modified so that it is displayed correctly in the drawing page. In particular, the position is controlled by X
and Y
, which are given in millimeters, and Scale
is important to correctly fit the projected shape in the page. The scale usually ranges from 1 to 0.25 (1:1 to 1:4) for small solids, and from 0.02 to 0.01 (1:50 to 1:100) for typical architectural elements.
Example:
import FreeCAD, Draft, Drawing
obj = Draft.makePolygon(5, 1000)
page = FreeCAD.ActiveDocument.addObject('Drawing::FeaturePage', 'Page')
page.Template = FreeCAD.getResourceDir() + 'Mod/Drawing/Templates/A3_Landscape.svg'
View = Draft.makeDrawingView(obj, page)
View.Scale = 0.02
FreeCAD.ActiveDocument.recompute()
View.X = 200
View.Y = 150
FreeCAD.ActiveDocument.recompute()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- 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, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub