Draft set focus on length instead of x coordinates

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Draft set focus on length instead of x coordinates

Post by carlopav »

I found a strange behaviour when checking the option in the topic title:
- using draft move the lengthValue box is not present in the task panel and the focus is not set to x coordinate;
- when drawing a line and approaching y axis, the focus is set on the yValue box instead of length box.

Tryed to solve with: https://github.com/FreeCAD/FreeCAD/pull/2139

can you confirm?
follow my experiments on BIM modelling for architecture design
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft set focus on length instead of x coordinates

Post by carlopav »

I was also thinking about adding the length/angle input boxes on the point UI taskpanel. I found a bit non consistent that is just displayed this when drawing a line, but not when drawing a DWire, or moving an object...
Cattura.JPG
Cattura.JPG (27.61 KiB) Viewed 999 times
What do you think?
follow my experiments on BIM modelling for architecture design
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft set focus on length instead of x coordinates

Post by yorik »

You're right. It should be available for more tools.
Basically in DraftTools.py, line 563, the line tool calls DraftGui.lineUi() which adds the extra fields. Inside the lineUi() function, the extra fields are separated in another function called extraLineUi(). I think we could start by calling extraLineUi() from wireUI() too. But there might be other steps needed...
The move tool, I think could simply use lineUI instead of pointUi, as it works basically the same way as a line.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft set focus on length instead of x coordinates

Post by carlopav »

Thanks for the hint!
I'll give it a try ;)
follow my experiments on BIM modelling for architecture design
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft set focus on length instead of x coordinates

Post by yorik »

I ended up fixing all these issues!
- The focus now goes on the length field when you lock the angle
- The Arch Wall, Arch Structure (in Beam mode) and Draft Move now make use of the Line interface. Still need to adapt the Draft Wire...
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft set focus on length instead of x coordinates

Post by carlopav »

Great, I didn't even have the time to breath in the last few days! Thanks Yorik
follow my experiments on BIM modelling for architecture design
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft set focus on length instead of x coordinates

Post by carlopav »

Playing more with Draft and the topic title property set, i realized that many incommand shortcuts don't work:
they are forwarded to the lenght text box, but don't produce any property change. Same for some really useful keys such as x y z to lock the axis.
Anybody can confirm?
I checked the code but i couldn't realize where this is handled.
follow my experiments on BIM modelling for architecture design
Post Reply