ShortCuts

Need help, or want to share a macro? Post here!
User avatar
Kunda1
Posts: 5913
Joined: Thu Jan 05, 2017 9:03 pm

Re: ShortCuts

Postby Kunda1 » Fri Feb 16, 2018 1:59 pm

wandererfan wrote:
Fri Feb 16, 2018 1:28 pm
Kunda1 wrote:
Wed Feb 14, 2018 3:07 pm
zbigg wrote:
Tue Feb 13, 2018 7:47 pm
Auxiliary command line, sth like in Autocad would not be bad...?? /do not forget to enable resizing for that window/pane for command history/
It's a good idea, open a feature ticket for it
Isn't the python console a big command line?
Yes, but I think they mean.. like a floating command line that can be invoked right under the mouse (think split screens).
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ShortCuts

Postby zbigg » Fri Feb 16, 2018 3:21 pm

Kunda1 wrote:
Fri Feb 16, 2018 1:59 pm
wandererfan wrote:
Fri Feb 16, 2018 1:28 pm
Kunda1 wrote:
Wed Feb 14, 2018 3:07 pm
zbigg wrote:
Tue Feb 13, 2018 7:47 pm
Auxiliary command line, sth like in Autocad would not be bad...?? /do not forget to enable resizing for that window/pane for command history/
It's a good idea, open a feature ticket for it
Isn't the python console a big command line?
Yes, but I think they mean.. like a floating command line that can be invoked right under the mouse (think split screens).
This idea evolved across Acad development, so I would not determine for now. Its just resizable window that can be docked, can be floating, can be hidden /like Windows taskbar/, can be invoked under mouse+key combination/hotkey etc. These are technicals.
Btw. IF FC would have such command line feature, one could expect to have similar power shortcut/hotkey handling w/built-in editor also,
capability to export/import custom definitions. This improves work efficiency greatly.
cheers,
User avatar
yorik
Site Admin
Posts: 11574
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: ShortCuts

Postby yorik » Sat Feb 17, 2018 1:14 pm

The python console is a big command line window. GUI-wise, it is a common dock widget, like the acad command line, it can do all the same things, be floating, be resized, placed anywhere on the FreeCAD UI, etc.

What I guess most autocad users want is an autocad-like command workflow, which is a sequence of prompts, that allows you to draw things with the keyboard only, for example, to draw a line from point 0,0,0 to point 10,10,0, you type something like this:
l <enter> 0,0 <enter> 10,10 <enter>

this would be possible to mimic somehow with a python function like this:

Code: Select all

def l():
	p1 = raw_input("start point: ")
	p1 = [float(n) for n in p1.split(":")[-1].strip().split(",")] 
	# the split(":")[-1].strip() above is needed because in the FreeCAD py window, raw_input swallows part of the prompt
	p2 = raw_input("end point: ")
	p2 = [float(n) for n in p2.split(":")[-1].strip().split(",")]
	import Draft
	Draft.makeLine(FreeCAD.Vector(p1+[0]),FreeCAD.Vector(p2+[0]))
l()
But of course this isn't very interesting... First one needs to digit the () when invoking the l function, and also you can use the Draft line tool directly from the keyboard too:

li < enter> 0 <enter> 0 <enter> 0 <enter> 10 <enter> 10 <enter> 0 <enter>

this will do the same as above. And in the output window you will get more or less the same prompts.

Basically if you look at all CAD applications out there, only autocad still uses a command line system, all other apps use a shortcut system like FreeCAD does. Honestly, as long as you can reach the same keyboard-only workflow, I don't see a big difference.

Maybe one small improvement that could be done, is to make the output that the Draft commands prints in the output window a little bit more verbose, for ex, print the digits as you type them. I'll experiment with that after the release.
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ShortCuts

Postby zbigg » Sat Feb 17, 2018 8:12 pm

Actually I can agree.
Command line not as much required as efficient & flexible hotkey system.
Suppose it still exists in Acad as a remnant from older versions.
But...in many cases it extends command's context, enables parameter input, lets to choose an option ect etc, what about it in FC ?
cheers,
triplus
Posts: 8786
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Sat Feb 17, 2018 10:11 pm

From ShortCuts module point of view. After i finish PieMenu i will highly likely add import and export feature to ShortCuts. And additional support for "low level (standard)" FreeCAD commands keyboard shortcuts will be explored. That is what users desired the most in the past when providing feedback.
zbigg wrote:
Sat Feb 17, 2018 8:12 pm
But...in many cases it extends command's context, enables parameter input, lets to choose an option ect etc, what about it in FC ?
In FreeCAD standard command usually does something without any special need for advanced user interaction. Beyond for example selecting. More complex command or a command with options usually provides a Tasks panel.

As for interactive command prompt. ShortCuts module only manages triggering of the FreeCAD command with a shortcut. Command itself would after need to support different input methods. Therefore providing more command line alike approach (as an alternative option). Compared to the current graphical paradigm provided by the Tasks panel. If anybody is interesting in doing something in this direction. Such widget can be added to Tasks panel first. By an individual command. And it can be evaluated after on how much sense does it make. That is for example triggering "Line command" could provide an interactive command line alike widget in the Task panel. Where user would input values for First point, Second point ... But in reality and for most users i doubt it would make that much difference. As things like having an overview of all available input options. And being able to change arbitrary one at any time usually provides more flexible workflow anyway.
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ShortCuts

Postby zbigg » Sun Feb 18, 2018 9:51 am

Basically-YES.
Anything that ensures efficient&maximized use and work with FC is OK. Only question is always whether one is not opening already open door?
I mean: do we provide sth better than already known solution? If so-not problem.
cheers,
triplus
Posts: 8786
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Sun Feb 18, 2018 4:10 pm

zbigg wrote:
Sun Feb 18, 2018 9:51 am
I mean: do we provide sth better than already known solution? If so-not problem.
When it comes to shortcuts support. On a "low-level workbench aware" customization support. We are likely not there yet 100%. The fact we use multi workbench approach to develop FreeCAD in parallel is likely contributing to this fact. For it to not happen sooner. Users therefore still tend to complain from time to time. From overlay alike shortcuts approach perspective. Like currently seen in ShortCuts module for FreeCAD. We are likely ahead already. Others will need to catch up. ;)

From command line input method approach. For an average user i feel that Tasks panel approach makes more sense anyway. And there is Python console. But it is more suitable for power users with basic understanding of Python programing. There therefore is a void. If somebody feels commands should support such input method and is prepared to work on it. I have no objections.
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ShortCuts

Postby zbigg » Sun Feb 18, 2018 8:51 pm

I will wait for stable rel. 17 then.
Feel too fresh to determine for now. lets give it a try.
Draft and Arch wb is my interest.
cheers,
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ShortCuts

Postby zbigg » Tue Apr 17, 2018 4:24 pm

hello,

SHortcut implementation drives me nuts.
Try to assign the keys: ASSIGN greyed out, inactive.
Try to clear the keys: CLEAR does not work

Whats going on?!
cheers,
triplus
Posts: 8786
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Tue Apr 17, 2018 9:36 pm

Hi @zbigg.

Although we discussed this things in the past already. And you likely know your question isn't directly related to ShortCuts module for FreeCAD. Seeing an eager users interested in this area. Hard to argue with that.

P.S. As for ShortCuts module for FreeCAD. I guess with a bit of patience we will get there.