position text on a beveled plane

Post here for help on using FreeCAD's graphical user interface (GUI).
User avatar
NormandC
Posts: 18461
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: position text on a beveled plane

Postby NormandC » Sun Feb 17, 2019 5:33 pm

garya wrote:
Sun Feb 17, 2019 4:47 pm
What is a bit disconcerting is that some of the other workbenches, such as part design, perform operations on the selected edge / face. So, for example, one selects an edge and then hits the bevel button to bevel that edge. Intuitively, when one switches to the draft wb one expects a similar behavior -- I would expect to be able to click on a face and then hit the shape string button to put text on that face.
But that's the point, it used to work that way before the ShapeString UI change, just as demonstrated in my videos. Have you tried to change the Draft interface mode to toolbar in the Draft preferences, as wandererfan suggested? Then it works as expected, but you need to restart FreeCAD for the interface change to take effect. Additionally, ShapeString requires setting an anchor point on the working plane, and that's what is unavailable in the Taskview interface mode.
garya
Posts: 171
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Re: position text on a beveled plane

Postby garya » Sun Feb 17, 2019 6:27 pm

NormandC wrote:
Sun Feb 17, 2019 5:27 pm
garya wrote:
Sun Feb 17, 2019 4:47 pm
Normand's demo only works because somehow (it's not clear to me how) the plane of the beveled face was selected.
I'm not sure what is not clear to you. In my videos, I select the slanted face in the 3D view before creating the ShapeString. In the reply in which I posted the videos, I wrote:
NormandC wrote:
Sat Dec 01, 2018 6:02 am
(...) in Draft, if you select a face before creating Draft geometry, then the face will automatically be set as the working plane.
This is one of the fundamental principles of the Draft workbench, and all Draft tools should normally allow for this work flow. Currently the Draft ShapeString UI in Taskview mode doesn't, even when setting the beveled face as working plane first, because it doesn't allow picking an anchor point lying on the working plane. With the slanted face set as working plane, the ShapeString is created parallel to the plane and intersecting the coordinates defined in the UI.
I'm claiming it doesn't always work, as described in my post.
Try creating a cube with two beveled faces.
In toolbar mode, try selecting each face and then putting text on it.

Here's my sequence:

FreeCAD
new document
part design wb
create body
part wb
click to create cube
part design wb
model tab
drag cube over body to create base feature
(is there a good explanation of what's going on here somewhere?)
click 3d view button so you can see 3 faces
model tab
select "Base Feature"
visibility/appearance
set transparency to 50%, <close>
note: selecting transparency of "Body" before cube is placed in it to 50% does not propagate to features inside. Is this a bug?
select edge between top and right faces
click bevel
increase bevel to 4 mm
click ok
select edge between top and left faces
click bevel
increase bevel to 4 mm
click ok
draft wb (I'm in toolbar mode as I write this)
grid is displayed on xy plane
click (select) right beveled face (face8 in my test here)
click shape string
pointer changes to round circle / + combination
beveled plane grid is displayed with origin more or less centered in plane
click location in face
selection changes to Chamfer0001
type "right", <enter>
increase font size to 3 <enter>
tracking <enter>
font file <enter> (assumes default is set)
text appears, on face
grid still shows as right beveled face plane grid
so far, so good
click (select) left beveled face (face3 in my test here)
click shape string
pointer changes to round circle / + combination
beveled plane grid is still displayed with origin more or less centered in plane for *right* plane
click location in face
selection changes to Chamfer0001
type "left", <enter>
increase font size to 3 <enter>
tracking <enter>
font file <enter> (assumes default is set)
text appears, at angle of plane for *right* bevel, and is located *inside* the cube
grid still shows as right beveled face plane grid
NormandC wrote:
Sun Feb 17, 2019 5:33 pm
garya wrote:
Sun Feb 17, 2019 4:47 pm
What is a bit disconcerting is that some of the other workbenches, such as part design, perform operations on the selected edge / face. So, for example, one selects an edge and then hits the bevel button to bevel that edge. Intuitively, when one switches to the draft wb one expects a similar behavior -- I would expect to be able to click on a face and then hit the shape string button to put text on that face.
But that's the point, it used to work that way before the ShapeString UI change, just as demonstrated in my videos. Have you tried to change the Draft interface mode to toolbar in the Draft preferences, as wandererfan suggested? Then it works as expected, but you need to restart FreeCAD for the interface change to take effect. Additionally, ShapeString requires setting an anchor point on the working plane, and that's what is unavailable in the Taskview interface mode.
Yes, I've been switching between taskview and toolbar mode frequently to try to understand what's going on.
I didn't understand about restarting FreeCAD when switching modes. If you switch modes but don't restart, I think you get more or less the same behavior, but with fields displayed in a dialog instead of in the toolbar.

What the two-plane scenario above demonstrates is that the setting of the anchor point doesn't work properly even in toolbar mode, or else I'm still doing something wrong.
wandererfan
Posts: 2476
Joined: Tue Nov 06, 2012 5:42 pm

Re: position text on a beveled plane

Postby wandererfan » Sun Feb 17, 2019 8:54 pm

NormandC wrote:
Sun Feb 17, 2019 5:27 pm
...because it doesn't allow picking an anchor point lying on the working plane.
Bear with me a sec, working plane and 3d point picker are weak areas for me. If the xyz fields are used to specify a point on the working plane, does everything work as it should? Just want to know if there is some magic in using the point picker that I have to account for.

Thanks.
garya
Posts: 171
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Re: position text on a beveled plane

Postby garya » Sun Feb 17, 2019 10:15 pm

wandererfan wrote:
Sun Feb 17, 2019 8:54 pm
NormandC wrote:
Sun Feb 17, 2019 5:27 pm
...because it doesn't allow picking an anchor point lying on the working plane.
Bear with me a sec, working plane and 3d point picker are weak areas for me. If the xyz fields are used to specify a point on the working plane, does everything work as it should? Just want to know if there is some magic in using the point picker that I have to account for.
No. The point is placed relative to the global origin
Roy_043
Posts: 151
Joined: Thu Dec 27, 2018 12:28 pm

Re: position text on a beveled plane

Postby Roy_043 » Mon Feb 18, 2019 9:59 am

garya wrote:
Sun Feb 17, 2019 6:27 pm
text appears, at angle of plane for *right* bevel, and is located *inside* the cube
I can confirm that only for the first ShapeString the selected face is used to update the current working plane (set to Auto). In my test the 2nd ShapeString is not located inside the solid however, but that may be due to the active snap settings (only Nearest in my test).
wandererfan
Posts: 2476
Joined: Tue Nov 06, 2012 5:42 pm

Re: position text on a beveled plane

Postby wandererfan » Tue Feb 19, 2019 2:07 pm

With this git commit dace2f39cf, the SS seems to be attached to the Face as expected. Let me know if you get different results.
garya
Posts: 171
Joined: Tue Nov 20, 2018 1:00 am
Location: Ovando, MT, USA

Re: position text on a beveled plane

Postby garya » Wed Feb 20, 2019 2:40 am

wandererfan wrote:
Tue Feb 19, 2019 2:07 pm
With this git commit dace2f39cf, the SS seems to be attached to the Face as expected. Let me know if you get different results.
Excellent! Limited testing so far but the text does attach to the proper plane.
I see what I think are two bugs from that point:

Toolbar mode:
1. In the above test case with a rectangular prism, placing the text first on the right side bevel:
The plane grid appears, and I thought the origin would be centered in the face. Is there a way to know where the planar origin lies?
After the text is moved to be part of the body and the attachment mode is set to plane face, I have to move the text ~4 units +x and -2 units y to get it where I originally placed it. That's for a rectangular prism 10 x 10 x 10 with bevels of 4.
2. When I place a second string on the left-hand face, the grid lines are not redrawn; those displayed are still those for the first placement. The text is placed correctly modulo the issue in #1, although the amount of shifting is different.

Taskview mode:
1. I think this wasn't reported before and should have been: the Tracking parameter is missing from the dialog.
Otherwise, issues are the same as for toolbar mode.

As is, it's way more usable than it was in both modes.
wandererfan
Posts: 2476
Joined: Tue Nov 06, 2012 5:42 pm

Re: position text on a beveled plane

Postby wandererfan » Thu Feb 21, 2019 1:32 am

garya wrote:
Wed Feb 20, 2019 2:40 am
Taskview mode:
1. I think this wasn't reported before and should have been: the Tracking parameter is missing from the dialog.
Otherwise, issues are the same as for toolbar mode.
I don't have much to offer for your toolbar points. AFAIK, I didn't change anything in the toolbar code and I don't know much about WorkingPlane or AttachmentModes.

It does seem that there should be a "reset" of the working plane selection mechanism after the first Shapestring is placed. This also happens with the other Draft tools I tried. Yorik might be able to shed some light.
yorik wrote:ping
As for Tracking in the UI, I left it out because it is rarely needed. You can always adjust it in the PropertyEditor.