Line2PEx - An improved line command?

This forum is for QCAD user developed script Add Ons and Plug-ins.
Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: Clive, andrew, Husky

Re: Line2PEx - An improved line command?

Postby riverbuoy » Sun Jul 13, 2014 4:05 pm

Andrew wrote:
I've decided against displaying the angle / length inside the drawing space for now, although the code is still in Viewport.js, commented out under '// snap restriction info:' if someone wants to try it.


I had to try. :D
However, putting it in Viewport.js gave me an idea. Instead of just displaying the angle/length when the restrict tool is active, why not allow the information to be displayed whenever a coordinate is requested. I created a command 'DisplayDistanceAngle', which does not actually have a default command, but uses the F8 key to toggle the information on and off. Actually it toggles through the following sequence:-
Off -> Display distance and angle -> Display distance onhly -> Display angle only
then back to off.
I have attached the file 'DisplayDistanceAngle.zip', which contains a subdirectory 'DisplayDistanceAngle' which should put in 'scripts/View' directory. It also includes the altered file 'Viewport.js' which replaces the current one in 'scripts/Widgets/Viewport'.

riverbuoy
riverbuoy
Active Member
 
Posts: 37
Joined: Thu Oct 03, 2013 5:37 pm

Re: Line2PEx - An improved line command?

Postby riverbuoy » Sun Jul 13, 2014 4:07 pm

Oops! Forgot to attach file. Here it is.
Attachments
DisplayDistanceAngle.zip
(6.39 KiB) Downloaded 29 times
riverbuoy
Active Member
 
Posts: 37
Joined: Thu Oct 03, 2013 5:37 pm

Re: Line2PEx - An improved line command?

Postby Husky » Mon Jul 14, 2014 8:42 am

@riverbuoy

Nice. I love it!

Normally my "Status bar" is switched off. But there are situation that I need to get particular information from the Status Bar so that I have to switch it on - just for a half minute or so.

With your F8 solution I'm able to get this information right on the pointer - simpler and faster!
Also very nice just to use F8 for a couple times to change the kind of Information which is then displayed!

But for the "Info tools" it could be confusing for a couple user because they forgot the "F8" functionality ...

Husky-2014.07.13-01.png
Husky-2014.07.13-01.png (18.15 KiB) Viewed 646 times


However - for me a nice expansion for QCAD. Thank you!
Work smart, not hard: QCad Pro
User avatar
Husky
Moderator
 
Posts: 659
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Line2PEx - An improved line command?

Postby riverbuoy » Tue Jul 15, 2014 5:23 pm

Husky wrote:
Nice. I love it!


Thanks. Glad you like it.

Husky wrote:
But for the "Info tools" it could be confusing for a couple user because they forgot the "F8" functionality ...


Oops!. I missed that. However, I have now moved the info label to the bottom left of the cursor. The only effect of this, I think, is if you add the info to the drawing, it will be in a slightly different place.

The only change is to the Viewport.js file, which I have attached.. Replace the current one in 'scripts/Widgets/Viewport'.

riverbuoy
Attachments
Viewport.js
(16.54 KiB) Downloaded 23 times
riverbuoy
Active Member
 
Posts: 37
Joined: Thu Oct 03, 2013 5:37 pm

Re: Line2PEx - An improved line command?

Postby Clive » Wed Jul 16, 2014 12:19 pm

Hi riverbuoy
Very nice work here :wink: , been trying this out and its very useful for the feedback. As regards the F8 toggle option, how about adding an additional button for this with options?
Clive
User avatar
Clive
Moderator
 
Posts: 915
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: Line2PEx - An improved line command?

Postby riverbuoy » Mon Jul 28, 2014 9:04 pm

Hi all.

When testing this, I realised that pressing F8 changes the display whether or not QCAD is waiting for a coordinate. For example, the 'trim' command expects the user to select entities, so the coordinates aren't shown. But pressing F8 still changes the display. So I have changed this so that it only changes when QCAD is expecting a coordinate.
Only one file is changed - 'DisplayDistanceAngle.js', which I have attached. Replace the existing file - '/scripts/View/DisplayDistanceAngle/DisplayDistanceAngle.js'.

Clive wrote:As regards the F8 toggle option, how about adding an additional button for this with options?

I regard this more as a simple feature rather than a full blown command. So, at the moment, I have no plans to add a command button.

riverbuoy
Attachments
DisplayDistanceAngle.js
(1.29 KiB) Downloaded 19 times
riverbuoy
Active Member
 
Posts: 37
Joined: Thu Oct 03, 2013 5:37 pm

Re: Line2PEx - An improved line command?

Postby Clive » Tue Jul 29, 2014 11:22 am

riverbuoy wrote:I regard this more as a simple feature rather than a full blown command. So, at the moment, I have no plans to add a command button.


No problem, thanks for all your input.
Clive
User avatar
Clive
Moderator
 
Posts: 915
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: Line2PEx - An improved line command?

Postby riverbuoy » Sun Aug 03, 2014 4:10 pm

Hi,

andrew wrote:OK. Eventually, that first key for tools in the options tool bar could even be configurable to some extent.


I have now added this option to 'Edit->Application Preferences->Widgets->Toolbars'. The option allows one character to be used as the first key. The input box cannot be empty, therefore to change the character, highlight the current character (use left arrow key, home key or mouse), and then type the character you wish to use. (If you change this while in the line command, for example, the change won't take effect until you exit the line command and then restart it.). The input box will not accept a space character, a plus(+) or a minus(-) character as these are currently one key shortcuts.
This involved changes to 3 files, which I have attached. These are 'EAction.js' which is in the '/scripts' directory. The other two files, 'ToolbarPreferences.js' and 'PreferencesPage.ui' are both in the '/scripts/Edit/AppPreferences/ToolbarPreferences' directory. Replace these files.
Phew, is the line command now complete?

riverbuoy
Attachments
PreferencesPage.ui
(3.98 KiB) Downloaded 18 times
ToolBarPreferences.js
(1.76 KiB) Downloaded 13 times
EAction.js
(44.48 KiB) Downloaded 18 times
riverbuoy
Active Member
 
Posts: 37
Joined: Thu Oct 03, 2013 5:37 pm

Re: Line2PEx - An improved line command?

Postby andrew » Wed Aug 06, 2014 3:07 pm

Thanks Robert. I've pushed these changes to the current master branch:
https://github.com/qcad/qcad

I've made some changes to the preference page layout and added the current shortcut to the tool tip of the tool buttons (e.g. "Close Sequence .C").
User avatar
andrew
Site Admin
 
Posts: 2568
Joined: Fri Mar 30, 2007 6:07 am

Previous

Return to QCAD 3 ' script Add-On & Plug-in challenge '

Who is online

Users browsing this forum: No registered users and 1 guest

cron