Page 1 of 1

Snap middle of the minimum distance between two entity's

Posted: Sun Aug 28, 2016 7:28 pm
by Husky
Hi everybody - I thought it can't hurt to put this "Feature request" also in this rubric - maybe somebody has fun and the time to work on it.

I think this explains everything what I'm looking for - but - if not - just ask. :wink:

http://www.ribbonsoft.com/bugtracker/in ... sk_id=1428

Thanks guys!!! 8)

Re: Snap middle of the minimum distance between two entity's

Posted: Mon Aug 29, 2016 10:19 am
by Clive
Just added my vote, what an excellent suggestion :D

Re: Snap middle of the minimum distance between two entity's

Posted: Mon Aug 29, 2016 8:17 pm
by Husky
Clive wrote:Just added my vote, what an excellent suggestion :D
Thanks Clive! :D

Re: Snap middle of the minimum distance between two entity's

Posted: Thu Sep 22, 2016 11:44 pm
by riverbuoy
Hi Husky

I downloaded your example drawing. Playing with the new tool 'Info: Distance Entity to Entity', I realised that this option always finds the shortest distance between any two entities. By checking the box 'add measurement to drawing', a line is printed along with the distance. You can snap to the middle point of the line.

Hope this helps

Regards

riverbuoy

Re: Snap middle of the minimum distance between two entity's

Posted: Fri Sep 23, 2016 3:21 am
by Husky
Hello riverbuoy, :D
riverbuoy wrote:Hi Husky

I downloaded your example drawing. Playing with the new tool 'Info: Distance Entity to Entity', I realised that this option always finds the shortest distance between any two entities. By checking the box 'add measurement to drawing', a line is printed along with the distance. You can snap to the middle point of the line.

Hope this helps

Regards

riverbuoy
Yep - that is what I do right now as a workaround. But my goal is to get rid of those unnecessary steps to get this simple task done.

Please consider - if I work on that way I have afterwards to remove this added measurement from the "Distance between two entities" tool. What means the text, the line and the divider. If I have my "help construction" between many other entities it is a pain in the back to remove it. Sure - I can use an extra layer for that but I think you will already agree that is just to much "workaround".

That is the reason why I have ask for a new snap tool. I think it should work like the "Middle Manual" snap tool. Just give it two entities and it will calculate the shortest distance between them and snap to it. I was hoping that the basic code of the "Distance entity to entity" info tool is usable to design this new snap tool but unfortunately I'm not a programmer.

Thanks for looking into this problematic - I appreciate it!

Re: Snap middle of the minimum distance between two entity's

Posted: Sun Nov 27, 2022 11:20 am
by CVH
Husky wrote:
Sun Aug 28, 2016 7:28 pm
Hi everybody - I thought it can't hurt to put this "Feature request" also in this rubric - maybe somebody has fun and the time to work on it.
Also voted for it and looking into this ...
Both the info distance tool and the manual middle snap are open source.
Mixing the two would not be that hard. :wink:
Husky wrote:
Fri Sep 23, 2016 3:21 am
... you will already agree that is just to much "workaround"
Agreed for the proposed method, and IMHO it is long overdue.
Only, the real workaround in your example is a line from the center of the arc perpendicular to the line.
The snapping point can than be found by SN of the two intersection points.
You only need to add/delete 1 auxiliary line in that case. :lol:

It can't be implemented as an auto snap considering the reply I made in FS#1428.
I rather think that it should be a manual snapping point as with SN, SH or SY.
riverbuoy wrote:
Thu Sep 22, 2016 11:44 pm
'Info: Distance Entity to Entity' ... always finds the shortest distance between any two entities.
Found that IN isn't functional with Splines and Ellipses.
The error message is: 'Entity is not a line, arc or circle.'
That should also excludes Polylines although it handles line and arc segments of a Polyline as closets RShapes to the cursor.
And it should exclude Dimensions but it is functional on the line art RShapes of dimensions.
In essence a Point is also an entity but for that we have IE and IP although the snap point is called 'End' while it has no size.

I rather think that the minimal distance to a Polyline (including Spline/Ellipse) should consider whole the entity.
The danger sits in where you point at and in what zoom state.
My Polylines for CNC usually have tiny rounding arcs at hard corners.

Husky, I think you need to reconsider the 'furthermost distance between two entity’s'.
That has to exclude Rays and X-lines and that will always be an endpoint of a Line entity.

Found that SN and SH don't update the MouseTip's and CommandPrompt, SY does.
For example, if I want to draw a circle with center and point (CI) and use Middle Manual (SN) the MouseTip remains 'Center'.
If I do the same using SY the MouseTip's will guide me trough it.


So far functional but I have the issue with whole the polylines to solve, implement Splines and Ellipses somehow, fix the MouseTip's.
I am a bit troubled by the ruled out code in https://github.com/qcad/qcad/blob/maste ... tanceEE.js
Tool states are handled quite different for SN & SH than in SY & IN.
And then there is the same issue with getClosestShape that acts on shapes of blocks-refs. on hidden, un-snappable and locked layers.
See example file in: https://www.qcad.org/rsforum/viewtopic.php?f=33&t=9671


Does anyone have a proposition for a good and free schortcut?
With 'S' that is limited to SJ, SV, S0-2 or S4-9.

Regards,
CVH