Global maxima / max. distance between two entities

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
yetanotheruser
Active Member
Posts: 27
Joined: Sat Dec 30, 2017 2:49 pm

Global maxima / max. distance between two entities

Post by yetanotheruser » Thu May 24, 2018 2:57 pm

I have an curved polyline segment for which I need to find the global maxima.
Here's an example image:
Image
- The red entity is the curved polyline segment
- The yellow line goes from the start point of the red entity to the end point of the red entity
I now need to find the point on the red entity that orthogonally has the maximum distance from the yellow line. I then want to use this point as starting point for a new line.

I tried Info - Distance Entity to Entity, but this
a) seems to make huge discrete steps, so I might not get the exact maxima with this method
b) it's a manual step
c) I can't set a relative point for further processing - when I switch to the line tool, the information where the (manually determined) maxima is, is gone.

Any help on how I can find the point on the red entity having orthogonally the maximum distance from the yellow line would be appreciated. Note that the yellow line is just a helping line for explaining my issue. If there is a way to get the point I am looking for without drawing this line, I am also happy ;-)

Thanks!

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Global maxima / max. distance between two entities

Post by andrew » Thu May 24, 2018 3:04 pm

1. Rotate the curve and yellow line into a normal position (e.g. using Modify > Align Reference Points without scaling).
The yellow line should be in a horizontal position.
2. Select the curve.
3. Misc > Draw > Draw Bounding Box
4. You should be able to find the desired point now as intersection point at the top.

yetanotheruser
Active Member
Posts: 27
Joined: Sat Dec 30, 2017 2:49 pm

Re: Global maxima / max. distance between two entities

Post by yetanotheruser » Thu May 24, 2018 3:51 pm

Thanks andrew, that works for finding the point in the rotated position (actually one doesn't even need the helping line :D ).
I then added a point at the intersection between curve and bounding box and manually rotated the curve (including the new point) back to their original position. Is this the intended/best way to do it or is there any genious trick to transfer the point determined in the rotated position back to the curve in their original position? Is there maybe some functionality in QCAD Pro to to rotate something the same angle it was rotated before, just in the opposite direction? (without manually writing the angle down and entering it again).

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Global maxima / max. distance between two entities

Post by andrew » Thu May 24, 2018 4:13 pm

yetanotheruser wrote:
Thu May 24, 2018 3:51 pm
Is there maybe some functionality in QCAD Pro to to rotate something the same angle it was rotated before, just in the opposite direction? (without manually writing the angle down and entering it again).
Again, have a look at Modify > Align Reference Points. This tool does not require you to enter an angle. Just click reference points.

yetanotheruser
Active Member
Posts: 27
Joined: Sat Dec 30, 2017 2:49 pm

Re: Global maxima / max. distance between two entities

Post by yetanotheruser » Thu May 24, 2018 4:25 pm

Thanks, I actually used reference points. Just wondering if - for rotating back - I again have to select the necessary reference points or if there is some kind of functionality/shorthand like "rotate back", which automatically undos the last rotation?

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Global maxima / max. distance between two entities

Post by andrew » Thu May 24, 2018 4:30 pm

yetanotheruser wrote:
Thu May 24, 2018 4:25 pm
Just wondering if - for rotating back - I again have to select the necessary reference points or if there is some kind of functionality/shorthand like "rotate back", which automatically undos the last rotation?
No, undo would also undo your bounding box and point.

yetanotheruser
Active Member
Posts: 27
Joined: Sat Dec 30, 2017 2:49 pm

Re: Global maxima / max. distance between two entities

Post by yetanotheruser » Thu May 24, 2018 7:40 pm

Thanks, I was wondering if there is a special undo function just for rotation (doing an inverse rotation), not the gobal undo function. But I understand there is none.

Post Reply

Return to “QCAD 'How Do I' Questions”