Tangent arc

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
Szymon
Newbie Member
Posts: 4
Joined: Wed Mar 01, 2023 7:36 pm

Tangent arc

Post by Szymon » Wed Mar 01, 2023 7:59 pm

It would be great if QCAD could create an arc tangent to another entity without necessity to type a radius.
Just two simple steps:
1. Click the endpoint of another entity to start the arc. The arc is tangent to the starting entity.
2. Click the second point to place the arc.

Thank you

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Tangent arc

Post by Husky » Wed Mar 01, 2023 11:04 pm

Szymon wrote:
Wed Mar 01, 2023 7:59 pm
It would be great if QCAD could create an arc tangent to another entity without necessity to type a radius.
An arc needs a radius. Usually you can define the radius by typing the vale or defining it with a snap point. Your suggestion is to eliminate the typing part but on one way or another you have to define the radius information. How will you accomplish that? Please provide an example drawing which shows what you are trying to accomplish.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

CVH
Premier Member
Posts: 3415
Joined: Wed Sep 27, 2017 4:17 pm

Re: Tangent arc

Post by CVH » Wed Mar 01, 2023 11:11 pm

Szymon,

Lets break this down:
- Tangent to a line means that the center is located on an orthogonal ray.
That counts for all kinds of line-art: line, arc, circle, ellipse, spline and both segment types of a polyline.
- Tangent and starting in an endpoint means that the orthogonal ray extends from the endpoint.
- Ending in a point means that we could construct a circle with its center on the ray, that goes trough the endpoint and the second point.

At this point there are an endless number of solutions.

IMHO your are missing or the radius or the sweep angle or a third point to define an arc fully.
Tangentially connected arc (AN) uses a radius as extra input for that.

Regards,
CVH

Szymon
Newbie Member
Posts: 4
Joined: Wed Mar 01, 2023 7:36 pm

Re: Tangent arc

Post by Szymon » Thu Mar 02, 2023 8:21 pm

Hi,
Please see attached.
I try to draw an arc tangent to a line which starts with point 1 and ends with point 2.
It can be done using circletangent2p but then I have to delete the part of circle which I don't need.

Regards
Szymon
Attachments
20230302_195326.gif
20230302_195326.gif (1013.32 KiB) Viewed 12158 times
20230302_200353.gif
20230302_200353.gif (676.74 KiB) Viewed 12158 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Tangent arc

Post by Husky » Thu Mar 02, 2023 10:09 pm

Hi Szymon,

thanks for the demonstration. You convinced at least me that this arc tool would be nice to have. :wink:

The right place to post a tool suggestion would be the Bugtracker/Feature Request Forum. It stays there on a "ToDo List" until a decision of implementation is made. Please feel free to fill a Feature Request below www.qcad.org/bugtracker
Note: You need to register separately to that forum ... :cry:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

CVH
Premier Member
Posts: 3415
Joined: Wed Sep 27, 2017 4:17 pm

Re: Tangent arc

Post by CVH » Fri Mar 03, 2023 9:49 am

Hi Szymon,

You are right ... The arc is fully defined by its chord. :roll:

I piggybacked it on the existing ArcTangential.js script.
When the radius is a non valid number (zero or less) the tool returned a Null-entity.
Null-entities may internally have a meaning but I consider actually casting them to a drawing to be erogenous.
I don't like to look for and erase them. That's my point of view.

Two flies at once: When the radius is invalid it will figure out the radius itself if possible.
Meaning that: Zero = Auto.
Below is the adapted copy of ArcTangential.js.

How to implement immediately:
Close QCAD.
In your installation folder of QCAD (Or in the local data location) create a folder .../scripts/Draw
Where '...' is your QCAD path.
Create below that a folder .../scripts/Draw/Arc
Create below that a folder .../scripts/Draw/Arc/ArcTangential
Download all files from https://github.com/qcad/qcad/tree/maste ... Tangential
Place them in the newly created folder .../scripts/Draw/Arc/ArcTangential/*.*
But replace ArcTangential.js by the script below.
Restart QCAD and the added script will supersede the original.

Works like a charm. :wink:

Regards,
CVH
Attachments
ArcTangential.js
Replacement for original script file
(8.21 KiB) Downloaded 262 times

Szymon
Newbie Member
Posts: 4
Joined: Wed Mar 01, 2023 7:36 pm

Re: Tangent arc

Post by Szymon » Fri Mar 03, 2023 7:55 pm

Hello,

This is exactly what I wanted.

Qcad is now perfect for me. It will be a lot easier for example to trace an image.

Thank you
Attachments
20230303_194716.gif
20230303_194716.gif (936.14 KiB) Viewed 12007 times

CVH
Premier Member
Posts: 3415
Joined: Wed Sep 27, 2017 4:17 pm

Re: Tangent arc

Post by CVH » Fri Mar 03, 2023 8:33 pm

Szymon wrote:
Fri Mar 03, 2023 7:55 pm
Qcad is now perfect for me.
Thank you. :wink:

But there is a catch. :roll:
As isn't there always ... :lol:

You now are running an adapted version of the arctangential script.
Any future change to any of the original files will not be mirrored.

In the long run there are several outcomes:
- Or Andrew adapt this in future releases of QCAD.
- Or he implements this in another way.
- And/or we need to keep tracking future changes.

I'll try to keep up for that last one.
Removing the custom but obsolete copies and folders is advised for the first two cases.
Szymon wrote:
Fri Mar 03, 2023 7:55 pm
It will be a lot easier for example to trace an image.
Appending a new arc segment to a polyline in creation is in the same fashion.
I'll see if I can apply this trick too ... :wink:

Regards,
CVH
Last edited by CVH on Sun Mar 05, 2023 6:14 am, edited 1 time in total.

CVH
Premier Member
Posts: 3415
Joined: Wed Sep 27, 2017 4:17 pm

Re: Tangent arc

Post by CVH » Sat Mar 04, 2023 6:19 am

Hi Szymon,

Seen in all your Gifs ...
How comes that your Crosshair always seems to have an offset to your cursor?

Regards,
CVH

Szymon
Newbie Member
Posts: 4
Joined: Wed Mar 01, 2023 7:36 pm

Re: Tangent arc

Post by Szymon » Sat Mar 04, 2023 9:08 pm

Hi,

I noticed that too. Fortunately it is only like that on these recorded Gifs.

Regards
Szymon

Post Reply

Return to “QCAD Suggestions and Feedback”