New command - SnapDistanceManual
Moderators: andrew, Husky, J-J
New command - SnapDistanceManual
SnapDistanceManual
This tool allows you to snap to a point that is between two points, or a given
distance from the first point, at an angle defined by the second point.
It includes a snap distance box and a drop down combo box. The combo box
has three options - 'Distance', 'Percent' and 'Fraction'. So if you entered
50 percent or a fraction of 0.5, for example, it would retuen a point exactly
half-way between the two points.
You enter the value in the snap distance box, and then choose 'Distance',
'Percent', or 'Fraction' from the drop down box.
This command does not restrict the distance, percent or fraction entered.
Therefore a distance greater than the distance between the two points will
return a point beyond the second point. Similarly a percentage greater than
100, and a fraction greater than 1 will return a point beyond the second point.
You can also enter a negative value. This will return a point before the first
point. (Note: You can enter fractions as '1/7', or '3/11' for example.)
The shortcut for this command is DM.
The attached zip file contains the SnapDistanceManual subdirectory.
Extract this to the scripts/snap subdirectory. Then add the
SnapDistanceManual directory to snap.pro, or replace it with the included
snap.pro file.
This tool allows you to snap to a point that is between two points, or a given
distance from the first point, at an angle defined by the second point.
It includes a snap distance box and a drop down combo box. The combo box
has three options - 'Distance', 'Percent' and 'Fraction'. So if you entered
50 percent or a fraction of 0.5, for example, it would retuen a point exactly
half-way between the two points.
You enter the value in the snap distance box, and then choose 'Distance',
'Percent', or 'Fraction' from the drop down box.
This command does not restrict the distance, percent or fraction entered.
Therefore a distance greater than the distance between the two points will
return a point beyond the second point. Similarly a percentage greater than
100, and a fraction greater than 1 will return a point beyond the second point.
You can also enter a negative value. This will return a point before the first
point. (Note: You can enter fractions as '1/7', or '3/11' for example.)
The shortcut for this command is DM.
The attached zip file contains the SnapDistanceManual subdirectory.
Extract this to the scripts/snap subdirectory. Then add the
SnapDistanceManual directory to snap.pro, or replace it with the included
snap.pro file.
- Attachments
-
- SnapDistanceManual.zip
- (30.6 KiB) Downloaded 880 times
Re: New command - SnapDistanceManual
Hi riverbuoy - this new command sounds interesting and I like to test it for me. Right now I'm not sure about this "snap.pro" file - where do I save it exactly? I don't have a "snap.pro" file which could be replaced ...riverbuoy wrote:Then add the
SnapDistanceManual directory to snap.pro, or replace it with the included
snap.pro file.
Re: New command - SnapDistanceManual
@riverbuoy, great new snap tool, works well - very useful indeed
@Husky, just copy and paste both the SnapDistanceManual folder and the Snap.pro file into the Scripts .Snap folder in QCAD. Remember to set the permissions.
Have fun
@Husky, just copy and paste both the SnapDistanceManual folder and the Snap.pro file into the Scripts .Snap folder in QCAD. Remember to set the permissions.
Have fun
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...
Re: New command - SnapDistanceManual
Hi Husky. I've just checked my trial version of QCad, and sure enough no snap.pro. So I copied the SnapDistanceManual folder into the scripts/Snap folder and restarted QCad, and it works. So no snap.pro required for the trial or commercial version. I was using the community source version which does require the file. I'll keep this in mind for the future.
Hi Clive. Thanks for your kind words.
Hi Clive. Thanks for your kind words.
Re: New command - SnapDistanceManual
Hi riverbuoy - really nice and useful tool - thanks for doing this!riverbuoy wrote:You can also enter a negative value. This will return a point before the first
point. (Note: You can enter fractions as '1/7', or '3/11' for example.)
May I ask you something what I haven't understood yet:
If I use a positive value like 1 1/3 Fraction I get a result what I have expected.
If I use the same value as a negative, - 1 1/3 or - (1/3), I don't understand the result. Could you please explain how it works correctly.
The second question is: Would it be possible to use the right click on the mouse to go one step back during the first or second point selection to "correct" a wrong point pick?
However - a nice and powerful snap tool!!!
Re: New command - SnapDistanceManual
Hello riverbuoy,
I just tried the tool you developed, thank you for sharing it. From what I saw at first, I believe it may even have more uses that you initially envisioned ...
I just tried the tool you developed, thank you for sharing it. From what I saw at first, I believe it may even have more uses that you initially envisioned ...
JJ Win7 pro-64
Re: New command - SnapDistanceManual
Hi,
I can only say thanks, this new tool is great. I'm a new user, and every day every day my excitement goes up.
Please go ahead
Thanks
I can only say thanks, this new tool is great. I'm a new user, and every day every day my excitement goes up.
Please go ahead
Thanks
QCad Pro
Re: New command - SnapDistanceManual
Hi Husky - Thanks for the feedback and positive reaction.
The command uses RMath.eval function to evaluate expressions. In expressions we
often leave out plus signs. So if we include the plus signs, for positive numbers
it evaluates as +1+1/3 which equals one and one third, as expected. However for
negative numbers what you have is -1+1/3 which equals minus two thirds. So to get
what you expect you need to negate both parts, i.e. -1-1/3, or negate the whole
number, i.e. -(1 1/3).
Hope this explains what is happening.
Right clicking is tricky. This command works by overriding the current action. If
we assume the current action is drawing a line, then that action is suspended
temporarily while we choose two points. This command sends the resulting point to
the line command and then terminates. Right clicking terminates the command and
control returns to the line command. If we changed this, we would require a
different way of terminating the command. As right-clicking is the standard way
of terminating commands, changing this would, I feel, confuse users.
Sorry for not being more helpful.
Hope this answers your questions.
Also thanks to J-J and Idealos for your kind comments.
The command uses RMath.eval function to evaluate expressions. In expressions we
often leave out plus signs. So if we include the plus signs, for positive numbers
it evaluates as +1+1/3 which equals one and one third, as expected. However for
negative numbers what you have is -1+1/3 which equals minus two thirds. So to get
what you expect you need to negate both parts, i.e. -1-1/3, or negate the whole
number, i.e. -(1 1/3).
Hope this explains what is happening.
Right clicking is tricky. This command works by overriding the current action. If
we assume the current action is drawing a line, then that action is suspended
temporarily while we choose two points. This command sends the resulting point to
the line command and then terminates. Right clicking terminates the command and
control returns to the line command. If we changed this, we would require a
different way of terminating the command. As right-clicking is the standard way
of terminating commands, changing this would, I feel, confuse users.
Sorry for not being more helpful.
Hope this answers your questions.
Also thanks to J-J and Idealos for your kind comments.
Re: New command - SnapDistanceManual
Yes it did - thanks a lot.riverbuoy wrote:Hope this answers your questions.
I'm not a big fan of construction lines and your new tool will help me to avoid a lot of such lines.
Yes, I have to agree! This "two point figure pick" could be the base for a couple more helpful tools / amplifications. I have already a couple ideas where it would be useful to have ... at least for me.J-J wrote:... I believe it may even have more uses that you initially envisioned ...
@Andrew
What do you think? Is it possible to get this new snap tool permanently implemented into QCAD Pro? My vote is "yes" ......... oups, there was no poll?
Re: New command - SnapDistanceManual
Its a good job you have QCAD to use then and not an old drawing board although you may have an old board somewhere...like I doHusky wrote:I'm not a big fan of construction lines and your new tool will help me to avoid a lot of such lines.
J-J wrote:... I believe it may even have more uses that you initially envisioned ...
Been testing this tool some more and yes I also agree, this new snap addition is certainly going to be more useful than we all think - what a great tool - well doneHusky wrote:Yes, I have to agree! This "two point figure pick" could be the base for a couple more helpful tools / amplifications. I have already a couple ideas where it would be useful to have ... at least for me.
I second you Husky.Husky wrote:@Andrew
What do you think? Is it possible to get this new snap tool permanently implemented into QCAD Pro? My vote is "yes" ......... oups, there was no poll?
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...
Re: New command - SnapDistanceManual
So do I...but let the master comment first!I second you Husky.
JJ Win7 pro-64
Re: New command - SnapDistanceManual
Oops, thanks for the admonishmentJ-J wrote:So do I...but let the master comment first!
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...