The Tech­ni­cal Draw­ing or Tech­Draw work­bench is an inte­gral part of FreeCAD allow­ing us to cre­ate beau­ti­ful tech­ni­cal draw­ings of our parts or assem­blies. In a world of CNC milling and 3D print­ing it’s still essen­tial at times to be able to sup­ply some­one with a tech­ni­cal draw­ing to help plan the mak­ing of a part. A tech­ni­cal draw­ing can also be extreme­ly use­ful as part of doc­u­men­ta­tion and could form part of a tech­ni­cal stan­dard for a project or prod­uct, so it’s impor­tant to be able to cre­ate tech­ni­cal draw­ings that meet our needs. 

In FreeCAD the Tech­Draw work­bench has a nice col­lec­tion of page tem­plates for us to use to insert our part views, dimen­sions and oth­er tech­ni­cal infor­ma­tion into. In a stock FreeCAD instal­la­tion when you use the “Insert Page Using Tem­plate” you get to choose between an array of stan­dard tem­plates. How­ev­er you can cre­ate and add cus­tom tem­plates allow­ing you to have pre­cise­ly what infor­ma­tion you need as well as per­son­alised brand­ing and any­thing else you require. Let’s look at cre­at­ing such a tem­plate using some of the tech­niques described in the offi­cial tem­plate doc­u­men­ta­tion and using the excel­lent, free and open­source Inkscape.

For this mini tuto­r­i­al we’ve used Inkscape ver­sion 1.3.1 and FreeCAD ver­sion 0.21.1. Also, as a reminder, when we describe a tool and a tool icon in either Inkscape or FreeCAD we’ll use the rollover text descrip­tion as the name. This hope­ful­ly encour­ages you to explore all the tool icons in a giv­en envi­ron­ment as you look for the one you need.

Start­ing in Inkscape let’s set up a doc­u­ment using “File-Doc­u­ment prop­er­ties…” to the over­all dimen­sions we require. We’ve used an A4 can­vas in Inkscape set in land­scape ori­en­ta­tion. We have cre­at­ed a fair­ly sim­ple tem­plate design by first adding a large rec­tan­gle that sat 4mm from the edge of the page at each side with radius cor­ners of 3mm. 

Next we drew a small rec­tan­gle at the low­er right hand cor­ner of the page snapped to the low­er right cor­ner of the page. The small­er rec­tan­gle again had 3mm radius cor­ners but we then, group select­ing the large and the small rec­tan­gle used the “divi­sion” tool from the “path” drop­down menu to remove the por­tions of the small­er rec­tan­gle that sat out­side the larg­er one.

This low­er right hand area is where we are going to place a logo and some text that will be editable lat­er in FreeCAD. We cre­at­ed and placed small­er rec­tan­gles into this area to form 3 small­er areas and used the “Text Tool” to add some place hold­ing text. This text describes what each box area should be even­tu­al­ly be edit­ed to con­tain, we went with Title, and Date. In the low­er larg­er area we import­ed a small logo and added some place­hold­er text that will become a ver­sion num­ber for the drawing.

Now that our design looks like what we want we need to use Inkscape’s XML edi­tor to make it work cor­rect­ly in FreeCAD. Fuller instruc­tions are avail­able on the offi­cial doc­u­men­ta­tion but let’s step through the basics here. First of all open the XML edi­tor by select­ing “XML Edi­tor” from the “Edit” drop­down menu. In the XML edi­tor win­dow you’ll see a pan­el on the left hand side where the first line reads some­thing sim­i­lar too <svg id=“svg1”>. High­light this line by left click­ing on it. In the right hand side of the XML edi­tor you’ll now see a list of attrib­ut­es under 2 col­umn head­ers labelled “Name” and “Val­ue”. In the upper left hand cor­ner you should see a “+” tool icon next to “Name”. Click this to add an attribute. In the “Name” sec­tion of the attribute you cre­at­ed add “xmlns:freecad” with­out the quotes and in “Val­ue” sec­tion you need to add “http://www.freecadweb.org/wiki/index.php?title=Svg_Namespace”.

Back on the left hand col­umn of the XML edi­tor we now need to left click the low­er drop­down menu which will have a label sim­i­lar to <g id =“layer1” inkscape:label=“Layer 1”>. In the drop­down you should find a list that rep­re­sents all the items in your draw­ing. If you left click to high­light items you should see that the item is select­ed on the actu­al draw­ing on the Inkscape can­vas. This is use­ful to iden­ti­fy which text or graph­ic item is which when work­ing with the XML edi­tor. You can also do this in reverse, select­ing the text or item on the can­vas high­lights the cor­re­spond­ing line in the XML editor.

If you have added sta­t­ic text there is no need to make any adjust­ments to the XML but for the text in our exam­ple we want it to be editable. Select your tar­get text item you want to make editable in the XML edi­tor and then add an attribute to this text item. In the “Name” sec­tion you need to add “freecad:editable” and in the “Val­ue” sec­tion you can add a recog­nis­able descrip­tion such as “Editable Title Text”. Repeat this for all your editable text items.

You now need to save your Inkscape project as a plain SVG, save it to any fold­er of your choosing.

Final­ly you need to check that the tem­plate opens and works cor­rect­ly in FreeCAD. In a FreeCAD project open up the Tech­Draw WB and then left click the “Insert Page using Tem­plate” icon. Nav­i­gate to your saved tem­plate and select it. You should see a “Page” item is cre­at­ed and in a new tab in the pre­view pane a tech­ni­cal draw­ing is cre­at­ed with your template. 

You’ll note there are some small box­es next to the text items when the Tech­Draw pre­view has frames active. Click­ing these allows you to edit the field and replace the place­hold­er text with the cor­rect infor­ma­tion for your project. You can also right click and use “Tog­gle Frames” to switch frame vis­i­bil­i­ty. When you even­tu­al­ly export your tech­ni­cal draw­ing (right click on the pre­view and select the export type) the result­ing tech­ni­cal draw­ing won’t have the lit­tle square mark­er buttons. 

There’s lots of infor­ma­tion and lots of user guides out there for using the Tech­Draw work­bench. As well as the offi­cial doc­u­men­ta­tion it’s well worth join­ing and read­ing the Tech­Draw spe­cif­ic sec­tion on the FreeCAD forum.


Discover more from FreeCAD News

Subscribe to get the latest posts sent to your email.