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: 5054
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
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

CVH
Premier Member
Posts: 4875
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 36129 times
20230302_200353.gif
20230302_200353.gif (676.74 KiB) Viewed 36129 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 5054
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
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."

CVH
Premier Member
Posts: 4875
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:

# EDIT 2025 #
[attachment]ArcTangential.js[/attachment] removed, see lower.
Downloaded 828 times before removal.


Regards,
CVH
Last edited by CVH on Tue Jun 03, 2025 7:59 am, edited 1 time in total.

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 35978 times

CVH
Premier Member
Posts: 4875
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: 4875
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

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

[SOLVED] Tangent arc #2023 Fix removed#

Post by CVH » Tue Jun 03, 2025 7:56 am

Update:

Andrew has included the functionality in the latest Pro release v3.32.3, see QCAD Changelog
Backed up by an RArc method that probably also serves for adding tangentially Arc(-like) segments to Polylines.

Clearing the checkbox or setting the Radius option to zero makes the tangent Arc radius adaptive.
Negative radii are not rejected, auxiliary shapes are still showing but nothing is created.

Because this is the QCAD Pro related forum and Andrew has implemented something similar but then as a Pro feature ...
... I will remove the enhanced copy of the script shortly.

For those that have installed it and to avoid that the copy is still used:
:arrow: Remove the custom installed ArcTangential.js script from .../scripts/Draw/Arc and all obsolete subfolders of .../scripts/

Regards,
CVH

Post Reply

Return to “QCAD Suggestions and Feedback”