Understanding Draft WB for text and graphics

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
catman
Posts: 62
Joined: Fri Jan 11, 2019 10:42 pm

Understanding Draft WB for text and graphics

Postby catman » Wed May 15, 2019 11:53 am

I want to make front panels, e.g. for a CNC machine. Basically only flat metal or plastic pieces with a cut out layer and a print layer with text and lines.

From other posts I got that
* the cut out layer is done with the sketcher WB. -> Works fine.
* the print layer can not be done with sketcher WB. Only because I can not work with font text.
* the print layer should be done with the Draft WB

After some trial and error, I was able to produce some basic front panel like that, but I have the feeling I am not doing it the right way. I was expecting that working with the Daft WB would be as efficient as with the sketcher WB: Assign a working plane (Button labeled "Auto"), get a grid, start adding text and geometry. Move, align and constraint them interactively to each other or external references.

Exmple
  • Flat rectangle as front panel with 1 hole for a 5 position switch.
  • The text needs numbers "0", "1", "2","3","4","5" arranged around the hole
I added each each number with the "S" tool (the "A" tool can't change fonts). Each number got its own leaf on the tree. For each "S" item I had to set the font and text color etc. again. I created a group folder "Texts" and moved all items in there. Now I could at least switch visibliliy of them with a single click.

But the whole feeling of 2D work planes was not there.
  • I could not select them as object on the screen, just in the tree. On the screen it would select a single line element.
  • I could select each number in the tree, but could not move them with the mouse. I had to select the positions in the property editor and change the coordinates.
  • There was no leaf in the tree for the workplane. Only the numbers. How can one add a nnumber "6" to the same layer? I copied and existing number and changed test and position. Aynthing else would mean to re-enter a lot of data in the property editor.
I did not procesed with lines yet (e.g. radial tick lines around the hole - one for each number), because it would take me 10 times as long as with the sketcher WB.

I guess I misunderstand the concept of the Draft WB somehow. There is a lot of functionality in the Draft WB and a lot of development effort. There must be an effiecient workflow behind that design - I am sure I got it all wrong.

How would an experienced FreeCAD crack do the example with the Draft WB?
User avatar
bejant
Posts: 5720
Joined: Thu Jul 11, 2013 3:06 pm

Re: Understanding Draft WB for text and graphics

Postby bejant » Wed May 15, 2019 3:10 pm

catman wrote:
Wed May 15, 2019 11:53 am
From other posts I got that
* the cut out layer is done with the sketcher WB. -> Works fine.
* the print layer can not be done with sketcher WB. Only because I can not work with font text.
* the print layer should be done with the Draft WB
Yes, and I followed your steps here. You could do the panel outline and hole in the Draft WB instead of Sketcher if you like.


catman wrote:
Wed May 15, 2019 11:53 am
I was expecting that working with the Daft WB would be as efficient as with the sketcher WB: Assign a working plane (Button labeled "Auto"), get a grid, start adding text and geometry. Move, align and constraint them interactively to each other or external references.
In the Draft WB we can't position geometry by Dimensions, instead it is the other way around: the position of Draft WB > Geometry determines the value of the Dimensions. In the attached example I didn't use any Dimensions and positioned the ShapeString text by eye.

After I made the Extrude (direction is Reversed), I clicked the top Face and clicked that Auto button to make my Working Plane at Z = 0.


catman wrote:
Wed May 15, 2019 11:53 am
I added each each number with the "S" tool (the "A" tool can't change fonts). Each number got its own leaf on the tree. For each "S" item I had to set the font and text color etc. again.
Instead, after you make the first ShapeString, try doing a Copy and Paste (Ctrl + C, then Ctrl + V, or use the pull-down menu, and I didn't include the dependent objects) to create the next ShapeString. Select the new ShapeString and from the Data Tab change the Property > String to the desired text. Now move the new ShapeString to the desired location (I used Line Segments as a visual guide for placing the ShapeStrings). Repeat to make the remaining numbers and the Font of the Copy will already be specified.


catman wrote:
Wed May 15, 2019 11:53 am
But the whole feeling of 2D work planes was not there.

I could not select them as object on the screen, just in the tree. On the screen it would select a single line element.
In the 3D view I click on the Face of the ShapeString to select that entire ShapeString.


catman wrote:
Wed May 15, 2019 11:53 am
I could select each number in the tree, but could not move them with the mouse. I had to select the positions in the property editor and change the coordinates.
In the Draft WB try the Move tool, it's a blue 4-way arrow, first tool in the Draft Modification toolbar. It can also make a Copy of the original at the desired location.


catman wrote:
Wed May 15, 2019 11:53 am
I created a group folder "Texts" and moved all items in there. Now I could at least switch visibliliy of them with a single click.
Yes, but if you Extrude a ShapeString, the Extrudes are not in the Group.


catman wrote:
Wed May 15, 2019 11:53 am
There was no leaf in the tree for the workplane. Only the numbers. How can one add a nnumber "6" to the same layer? I copied and existing number and changed test and position. Aynthing else would mean to re-enter a lot of data in the property editor.
To add a number 6, you can do Copy and Paste, or you can use the Draft WB > Move tool and create a Copy. You don't need to see the Working Plane in the history tree, because you should have already set it (be sure not to leave it at "Auto").


catman wrote:
Wed May 15, 2019 11:53 am
I did not procesed with lines yet (e.g. radial tick lines around the hole - one for each number), because it would take me 10 times as long as with the sketcher WB.
Draw a Draft WB > Line for the first tick, select it, create a Draft WB > Array. In the history tree select Array, and from the Data Tab change the Property > Type from Ortho to Polar and change the Property Number Polar from 1 to 6.


catman wrote:
Wed May 15, 2019 11:53 am
I am sure I got it all wrong.
No, you probably just need a few pointers, so I hope this helps. File is attached but if you're using Windows or Mac you'll have to change the Property > FontFile location to your desired font and location (I'm on Ubuntu and also used a Ubuntu font).


20190515a.png
20190515a.png (49.85 KiB) Viewed 222 times

20190515a.FCStd
(238.93 KiB) Downloaded 2 times


OS: Ubuntu 18.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
User avatar
Jimidi
Posts: 491
Joined: Wed Jul 26, 2017 3:53 pm

Re: Understanding Draft WB for text and graphics

Postby Jimidi » Wed May 15, 2019 5:47 pm

catman wrote:
Wed May 15, 2019 11:53 am
I want to make front panels, e.g. for a CNC machine. Basically only flat metal or plastic pieces with a cut out layer and a print layer with text and lines.
...
The text needs numbers "0", "1", "2","3","4","5" arranged around the hole
...
Hello Catman,
I had made an engraved facade test for a rotary switch "Lorlin 2C6P", I share it here just for inspiration.
In the hope that it can help ... :)

Illustration once the project finished:


face gravée Lorlin 2C6P.jpg
face gravée Lorlin 2C6P.jpg (306.14 KiB) Viewed 199 times

... and the file for dismounting:


Sorry for my bad English, I'm French. :oops:

Greetings, best regards, Jean-Michel
catman
Posts: 62
Joined: Fri Jan 11, 2019 10:42 pm

Re: Understanding Draft WB for text and graphics

Postby catman » Wed May 15, 2019 6:50 pm

@bejant
thanks for your detailed comments. I will try out the steps and check back with your helpful file

bejant wrote:
Wed May 15, 2019 3:10 pm
You could do the panel outline and hole in the Draft WB instead of Sketcher if you like.
From what I understood now I can see that. However, I am not sure if that really is an advantage as the outlines usually need to match given dimensions.

bejant wrote:
Wed May 15, 2019 3:10 pm
I clicked the top Face and clicked that Auto button to make my Working Plane at Z = 0.
....
To add a number 6, you can do Copy and Paste, or you can use the Draft WB > Move tool and create a Copy. You don't need to see the Working Plane in the history tree, because you should have already set it (be sure not to leave it at "Auto").
I guess that working plance concept is not yet clear to me. You say in the tree there is not plane. When pressing Auto puts you on plane Z=0, how would I have 2 working planes angled at 45° to each other and translated about some distances? Or maybe there is only one working plane per part but that would mean you can not have writings on the front and on one of the sided on the same part.
bejant wrote:
Wed May 15, 2019 3:10 pm
Instead, after you make the first ShapeString, try doing a Copy and Paste (Ctrl + C, then Ctrl + V, or use the pull-down menu, and I didn't include the dependent objects) to create the next ShapeString. Select the new ShapeString and from the Data Tab change the Property > String to the desired text. Now move the new ShapeString to the desired location (I used Line Segments as a visual guide for placing the ShapeStrings). Repeat to make the remaining numbers and the Font of the Copy will already be specified.
Ok, I thought that would be just a workaround. After you finished your parts and want to check out a different font, I guess you just select all in the tree and change the property (I will need to try that).
bejant wrote:
Wed May 15, 2019 3:10 pm
In the 3D view I click on the Face of the ShapeString to select that entire ShapeString.
Hm. I tried that but it did not work. I will check it with your file.
bejant wrote:
Wed May 15, 2019 3:10 pm
Draw a Draft WB > Line for the first tick, select it, create a Draft WB > Array. In the history tree select Array, and from the Data Tab change the Property > Type from Ortho to Polar and change the Property Number Polar from 1 to 6.
Is there a way to group those items once I made them. In case I would want to align it with anout switch I'd move the group
My main worry is that the line work I have in mind are rounded boxes to group elements. When I have to do the placement manually wouldn't there be a lot to adjust in case I decided to insert another switch and one of the middle groupe hat to get larger. In a constraint sketch I would just change one dimensions and insert my new element. So I guess there is really a whole new set of solutions and abilities required to get efficeint with the Draft WB.
bejant wrote:
Wed May 15, 2019 3:10 pm
catman wrote:
Wed May 15, 2019 11:53 am
I am sure I got it all wrong.
No, you probably just need a few pointers, so I hope this helps.
Well, I'm afraid thats really needed. ;)


@Jimidi
Jimidi wrote:
Wed May 15, 2019 5:47 pm
I share it here just for inspiration.
This worked really well, indeed. I am looking forward to find out how you actually did the arc. Looks absolutely professional. Is that a POV ray rendering?
vocx
Posts: 727
Joined: Thu Oct 18, 2018 9:18 pm

Re: Understanding Draft WB for text and graphics

Postby vocx » Wed May 15, 2019 9:57 pm

catman wrote:
Wed May 15, 2019 6:50 pm
...
I guess that working plance concept is not yet clear to me. You say in the tree there is not plane. When pressing Auto puts you on plane Z=0, how would I have 2 working planes angled at 45° to each other and translated about some distances? Or maybe there is only one working plane per part but that would mean you can not have writings on the front and on one of the sided on the same part.
...
The working plane is dynamic; it can be chosen with the Draft SelectPlane button. Just select any flat face, and press the button to automatically set the working plane in that position; you can offset it positively or negatively to the normal of that face as well.

You can create a Draft Rectangle, rotate it 45 degrees around the X or Y axes, and move it around, and then choose the face of the rectangle and press Draft SelectPlane button.
FreeCAD_Draft_SelectPlane_rotated.png
FreeCAD_Draft_SelectPlane_rotated.png (11.3 KiB) Viewed 168 times
If you are going to be using the same working plane for many features, you can set the working plane, then use Draft SetWorkingPlaneProxy. This will create a plane proxy that you can use with Draft SelectPlane to quickly reposition the working plane in the same position.
User avatar
bejant
Posts: 5720
Joined: Thu Jul 11, 2013 3:06 pm

Re: Understanding Draft WB for text and graphics

Postby bejant » Thu May 16, 2019 4:43 am

catman, if you can upload a hand sketch or drawing of what you want to create we can give better help.
catman
Posts: 62
Joined: Fri Jan 11, 2019 10:42 pm

Re: Understanding Draft WB for text and graphics

Postby catman » Thu May 16, 2019 10:42 am

vocx wrote:
Wed May 15, 2019 9:57 pm
The working plane is dynamic; it can be chosen with the Draft SelectPlane button. Just select any flat face, and press the button to automatically set the working plane in that position; you can offset it positively or negatively to the normal of that face as well.
[...]
If you are going to be using the same working plane for many features, you can set the working plane, then use Draft SetWorkingPlaneProxy. This will create a plane proxy that you can use with Draft SelectPlane to quickly reposition the working plane in the same position.
Excellent. This stuff is exactly the kind of information that I would love to see in the documentation. There is only reference what the icons do, but not how the WB should be used.

I guess the Proxy is what I had been looking for when I expected the plane in the tree.
catman
Posts: 62
Joined: Fri Jan 11, 2019 10:42 pm

Re: Understanding Draft WB for text and graphics

Postby catman » Thu May 16, 2019 10:50 am

bejant wrote:
Thu May 16, 2019 4:43 am
catman, if you can upload a hand sketch or drawing of what you want to create we can give better help.
This is a rough sketch of the idea. There is a framework of roundes rects around switches and control elements.The cirles and rects are just placeholders for the elements. Each circle would have a text assigned to it, preferably grouped with the same distance to the circle center and test style and color etc. The top lines would be interrupted by a text telling what the sections are, e.g. manual control, automatic modes, tool change etc.

During the design I would expect tgat this will often change size and shape. Thus I am fearing that manual placement leads to a lot of rework with any change.
panelConcept.png
panelConcept.png (15.22 KiB) Viewed 121 times
it would be easy to to in inkscape etc where you can group things, copy around and align stuff quickly. But doing that in freecad would allow to put in the 3d models of all the controls and check for collisions behind the surface directly.
kisolre
Posts: 1101
Joined: Wed Nov 21, 2018 1:13 pm

Re: Understanding Draft WB for text and graphics

Postby kisolre » Thu May 16, 2019 12:31 pm

catman wrote:
Thu May 16, 2019 10:50 am
Thus I am fearing that manual placement leads to a lot of rework with any change.
You can use "Part" container for that. It works like a Group but has placement/orientation properties so all items inside move together when you move the part. You can ofcource move them separately to reposition in the Part.
Jimidi wrote:
Wed May 15, 2019 5:47 pm
I had made an engraved facade test for a rotary switch "Lorlin 2C6P",
How did you set the red color for that faces?... found it - Part/Create simple copy and then RMB/SetColors
User avatar
Jimidi
Posts: 491
Joined: Wed Jul 26, 2017 3:53 pm

Re: Understanding Draft WB for text and graphics

Postby Jimidi » Thu May 16, 2019 4:11 pm

catman wrote:
Wed May 15, 2019 6:50 pm
...
This worked really well, indeed. I am looking forward to find out how you actually did the arc. Looks absolutely professional. Is that a POV ray rendering?

Hello Catman, no, no POV ray, just "texture mapping" of the "Display" menu ;-)
A topic about this, in French :
https://forum.freecadweb.org/viewtopic.php?f=12&t=27947

For the arc, it is a visible function in the tree.


Sorry for my bad English, I'm French. :oops:
Greetings, best regards, Jean-Michel