Draft Workbench: Difference between revisions

From FreeCAD Documentation
No edit summary
Line 1: Line 1:
The draft Module is a work-in-progress and quite experimental module made to add basic 2d drawing functionality to FreeCAD. It is written entirely in python, and is also intended to showcase how far you can extend FreeCAD entirely in python, without even touching the source code. This module is currently developed outside of the main FreeCAD development structure.
The draft Module is a work-in-progress and quite experimental module made to add basic 2d drawing functionality to FreeCAD. It is written entirely in python, and is also intended to showcase how far you can extend FreeCAD entirely in python, without even touching the source code. This module is currently developed outside of the main FreeCAD development structure but will be integrated soon.


Currently it is not really usable for production work, but already contains a couple of working basic functions. Feel free to test, and give us a feedback on the [[Talk:Draft_Module|discussion page]].
Currently it is not really usable for production work, but already contains a couple of working basic functions. Feel free to test, and give us a feedback on the [[Talk:Draft_Module|discussion page]].
Line 7: Line 7:
==Installation==
==Installation==


The draft Module is currently not part of the FreeCAD package, so you'll need to download it from here:
The draft Module is currently not part of the FreeCAD package, so you'll need to download the most recent version from here:
http://yorik.orgfree.com/scripts/Draft.zip
http://yorik.orgfree.com/scripts/Draft.zip
The zipfile here above contains just a "draft" directory. To install the module, simply place that draft directory into the "Mod" directory of FreeCAD, as explained in the [[Installing more workbenches]] page.
The zipfile here above contains just a "draft" directory. To install the module, simply place that draft directory into the "Mod" directory of FreeCAD, as explained in the [[Installing more workbenches]] page.

Please note that the draft module requires two specific python modules to be installed and working on your system, PyQt4 and Pyvy. Instructions for installing or compiling these modules can be found on the [[extra python modules]] page. But if you are using an official FreeCAD package from the FreeCAD website, those two modules are usually already included in the package and you don't need to worry about it!


==General use==
==General use==


[[Image:Draftscreenshot.jpg|center|The draft interface with the buttons toolbar and the function toolbar]]
[[Image:Draftscreenshot.jpg|center|The draft interface with the buttons toolbar and the function toolbar]]
Once installed, the draft workbench will be availible in your workbenches list. When you activate it, two toolbars will appear; a classical '''toolbar''' containing the standard draft commands listed below and a special '''command bar''' that has no tool icon on it, but that is used by the different functions to display their controls. On that toolbar, you can also change general things like current line color and width.
Once installed, the draft workbench will be available in your workbenches list. When you activate it, two toolbars will appear; a classical '''toolbar''' containing the standard draft commands listed below and a special '''command bar''' that has no tool icon on it, but that is used by the different functions to display their controls. On that toolbar, you can also change general things like current line color and width.


One thing is important to know, the draft workbench doesn't put you automatically in orthographic projection (why would it?). So before drawing, make sure you are in orthographic projection and in the appropriate view, since at the moment not all the commands work in 3D.
One thing is important to know, the draft workbench doesn't put you automatically in orthographic projection (why would it?). So before drawing, make sure you are in orthographic projection and in the appropriate view, since at the moment not all the commands work in 3D.
Line 28: Line 26:
* [[Draft_OCA|Open Cad format .OCA]]
* [[Draft_OCA|Open Cad format .OCA]]


==Drawing functions==
==Drawing objects==


These are tools for creating objects
These are tools for creating objects.


[[Image:Draft_Line.png]] [[Draft_Line|2-point Line]]
[[Image:Draft_Line.png]] [[Draft_Line|2-point Line]]
Line 44: Line 42:
[[Image:Draft_Text.png]] [[Draft_Text|Text]]
[[Image:Draft_Text.png]] [[Draft_Text|Text]]


==Modifying objects==
==Modification functions==


These are tools for modifying objects
These are tools for modifying existing objects.


[[Image:Draft_Move.png]] [[Draft_Move|Move]]
[[Image:Draft_Move.png]] [[Draft_Move|Move]]
Line 60: Line 58:
[[Image:Draft_Trimex.png]] [[Draft_Trimex|Trim/Extend (Trimex)]]
[[Image:Draft_Trimex.png]] [[Draft_Trimex|Trim/Extend (Trimex)]]


[[Image:Drafticonapply.png]] [[Draft_Apply|Apply style]]
==Other functions==

These is a category for tools I don't know where else to put :)

===[[Image:Drafticonapply.png]] Apply Style===

Context menu > draft > Apply Style

This function applies current line width and color to selected objects. If groups are selected, all objects inside them will take the style too.
This function is only availible when something is selected. It is also availible from the tree context menu.

==Export functions==

These are functions for exporting the current document to other file formats.

===Autodesk DXF===

File Menu > Export

The exported DXF is compatible with Autocad version 12 and up, so it should open in about any application that supports dxf format.
Currently the following FreeCAD features get exported:

* Lines get converted to dxf lines
* Polylines get converted to single lines (provisory)
* Circles get converted to circles
* Arcs (open circles) get converted to arcs
* colors are mapped from objects RGB colors to autocad color index (ACI). Black will always be "by layer"
* layers are mapped from group names When groups are nested, the deepest group gives the layer name.


==Common behaviours==
==Common behaviours==

Revision as of 19:57, 31 December 2008

The draft Module is a work-in-progress and quite experimental module made to add basic 2d drawing functionality to FreeCAD. It is written entirely in python, and is also intended to showcase how far you can extend FreeCAD entirely in python, without even touching the source code. This module is currently developed outside of the main FreeCAD development structure but will be integrated soon.

Currently it is not really usable for production work, but already contains a couple of working basic functions. Feel free to test, and give us a feedback on the discussion page.

I also maintain a workplan of the whole thing here.

Installation

The draft Module is currently not part of the FreeCAD package, so you'll need to download the most recent version from here: http://yorik.orgfree.com/scripts/Draft.zip The zipfile here above contains just a "draft" directory. To install the module, simply place that draft directory into the "Mod" directory of FreeCAD, as explained in the Installing more workbenches page.

General use

The draft interface with the buttons toolbar and the function toolbar
The draft interface with the buttons toolbar and the function toolbar

Once installed, the draft workbench will be available in your workbenches list. When you activate it, two toolbars will appear; a classical toolbar containing the standard draft commands listed below and a special command bar that has no tool icon on it, but that is used by the different functions to display their controls. On that toolbar, you can also change general things like current line color and width.

One thing is important to know, the draft workbench doesn't put you automatically in orthographic projection (why would it?). So before drawing, make sure you are in orthographic projection and in the appropriate view, since at the moment not all the commands work in 3D.

Importing & exporting

These are functions for opening, importing or exporting other file formats. Opening will open a new document with the contents of the file, while importing will append the file content to the current document. Exporting will save the selected objects to a file. If nothing is selected, then all objects will be exported. Currently supported file formats are:

Drawing objects

These are tools for creating objects.

2-point Line

File:Draft Polyline.png Multiple-point Line (Polyline)

Circle

Arc

Rectangle

Text

Modifying objects

These are tools for modifying existing objects.

Move

Rotate

Offset

Upgrade

Downgrade

Trim/Extend (Trimex)

File:Drafticonapply.png Apply style

Common behaviours