My #1 most desired feature: drawing tangent lines as easily and seamlessly as in LibreCAD

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

Moderator: andrew

Post Reply
WraithGlade
Junior Member
Posts: 16
Joined: Tue Feb 13, 2024 7:26 pm

My #1 most desired feature: drawing tangent lines as easily and seamlessly as in LibreCAD

Post by WraithGlade » Tue May 06, 2025 4:21 am

Hello! It has been a long time since my last visit to the QCAD forums, largely because I've been pursuing other things for several months (~1 year?) and but I am about to use QCAD more soon. In fact, just tonight I bought my first upgrade (my second purchase) of QCAD since I love the software so much and because of the new boolean operation features and such.

I remain (as always since I stumbled upon it) grateful for QCAD's existence, since it enables expressing 2D relationships among shapes much more fully than any other software I've yet used. I actually use it more for art purposes, though I appreciate its engineering potential too. Software like Inkscape by contrast is far too tedious to express precise relationships in and hence hard to get truly clean geometry in compared to QCAD. QCAD's art potential is greatly underestimated I think and not enough people know about it and how wonderful the software is.

:idea:

More to the point of this specific thread though: There is still a simple feature that I very much want in QCAD and which is present in LibreCAD (and also in a user-made custom script someone on the forums told me about, but not as seamlessly and quick to use as in LibreCAD). Specifically, the ability to draw tangents from the endpoints of polylines that are perfectly tangent to it yet allows you to place the endpoint of the resulting arc anywhere (not constrained by a specific angle or height or whatever else).

To see what I mean, open LibreCAD and click the Polyline tool and find the "Line" dropdown menu on the top bar and click it and change it to "Tangential" instead. This mode results in by far the most pleasant line drawing experience of any such tool I've encountered, including in vector art programs. It automatically places straight lines when the line you draw is straight but draws perfect arcs that are tangential to the current endpoint yet can be placed anywhere you want. :!:

QCAD's current workflow for the equivalent effect is honestly perhaps 10x more tedious and slow. LibreCAD's "Tangential" polyline mode behaves far better and is far more expressive and efficient. Even QCAD's user-made script that enables itself when installed and when the QCAD tangential arc tool has a radius set to zero is not close to as good, since it cannot in contrast handle straight lines seamlessly nor is it remotely as fast to draw with due to the fact that QCAD requires you to constantly re-click the line or arc that you want the tangent to come from whereas LibreCAD's tangential mode remains active until you are done (just like the regular line mode and such in QCAD). It would be more consistent (and far faster) if QCAD behaved similarly.

Don't underestimate the potential of this feature! Go try it yourself and see compare how much easier it is to draw perfect curved shapes for art with it. I like it even more than vector art Bezier curves such as in Inkscape since the arcs are more predictable and clean typically (much less "wiggle" and no constantly fiddling with "weights"). It is seriously a wonderful way of working with lines.

QCAD is overall a much better program than LibreCAD though (unsurprisingly considering it is the authentic original) and I like it much more, but I am constantly wishing for a much more expedient way of working with continuous chains of lines that have to remain tangential to each segment's endpoint and LibreCAD's workflow for that is much better. I suppose I could switch back and forth when needed, but it would be nice if QCAD had this feature, especially considering how essential it is to working with curved lines without wasting tons of time for no good reason.

Anyway, thanks again for this awesome software and congrats on the new releases! Have a great day/night/etc!

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

Re: My #1 most desired feature: drawing tangent lines as easily and seamlessly as in LibreCAD

Post by CVH » Thu May 08, 2025 6:05 am

Hi,
WraithGlade wrote:
Tue May 06, 2025 4:21 am
I remain (as always since I stumbled upon it) grateful for QCAD's existence, since it enables expressing 2D relationships among shapes much more fully than any other software I've yet used.
You probably mean geometrically correct because there are no relationships between individual drawing entities.
With a few exceptions like Dimensions entities, what is a combination of things, or Block Attributes in some way.
The content of a Block as Block reference or the content of a Viewport can also be seen as a fixed relationship.
WraithGlade wrote:
Tue May 06, 2025 4:21 am
Even QCAD's user-made script that enables itself when installed and when the QCAD tangential arc tool has a radius set to zero is not close to as good, since it cannot in contrast handle straight lines seamlessly nor is it remotely as fast to draw with due to the fact that QCAD requires you to constantly re-click the line or arc that you want the tangent to come from
I presume you mean the modification to the existing ArcTangential.js script presented in this topic.
That is a tool to draw an Arc shape that starts tangentially connected to a base entity what is limited to lines and arcs (For some unknown reason).
One single Arc shape ...
Indeed, the tool resets itself after the creation of an Arc requesting a new base shape for the next Arc.
A rather common behavior for many QCAD drawing tools.

This tool is intended to draw arcs and can not be used to draw straight lines.
The start position is the nearest ending of the base shape, the result must be tangentially connected.
You indicate an endpoint and I start to wonder how to diversify between an Arc or a Line entity.
As line there is but one solution and that is a co-linear endpoint in the tangent direction.
But always resulting in an overflow because the almost straight Arc has an unlimited large radius.
Although, it will almost never be possible to indicate such a position based on the limited resolution in pixels.


On polylines first this: 'Polylines with Arcs' is not entirely correct.
Polylines are a chain of segments between nodes or vertices.
Segments can be straight or bulging outwards when the bulge factor is different from zero.
There is nothing closely related to an Arc with: Center, Radius, Start and End-angle included.

The conversion of a straight segment between two nodes into a Line entity or backwards is straightforward.
But a bulging segment only mimics an Arc shape, conversion between the two is never exact.
Arcs have end angles, bulging segments have endpoints, polar to Cartesian or back is not 1:1.

If you read further down in the ArcTangential topic there is a note to apply a similar modification to DrawPolyline.js.
Again with 'Radius' = Auto and/or 'Sweep' = Auto when invalid.
Fully functional as we speak but never shared with the community.

If the modified ArcTangential.js does not make the cut, then why would a modification to DrawPolyline.js even be considered?
Also see this contribution by riverbuoy aka Robert S. (2015) that never made the cut. (Avoid, read my reply to user cfg)

There is however a catch, DrawPolyline.js resets the 'Arc with radius' option on adding a single Arc like segment.
Logical for the first segment but after that I see no reason.

There are other things to consider.
ArcTangential.js is a stand alone tool.
DrawPolyline.js is also the base class for other polyline tools, e.g.: PolylineAppendNode (QCAD PRO feature).
You don't want to mess with PROprietary and thus undocumented code.

I implemented the modifications hoping that I don't disturb other functionality.
Contact me per PM if you are interested.

Regards,
CVH

WraithGlade
Junior Member
Posts: 16
Joined: Tue Feb 13, 2024 7:26 pm

Re: My #1 most desired feature: drawing tangent lines as easily and seamlessly as in LibreCAD

Post by WraithGlade » Fri May 23, 2025 10:01 pm

Sorry for my delay in responding to you! I've been busy with many other unrelated matters.

I thank you for your time and efforts in responding to me. That is always greatly appreciated of course.

I'm a bit unsure about some aspects of what you've said though. You sound kind of like you are dismissing the idea I'm talking about as being somehow partially or completely unworkable or bad, but the feature I'm talking about literally already works perfectly in LibreCAD and is objectively extremely useful and thus I don't understand the negative response to some aspects of the suggestion.

Did you actually test the correct drawing function in LibreCAD?

Whereas QCAD's method of doing this (using the community script) uses the tangent arc drawing tool, LibreCAD uses the polyline drawing tool instead.

In order for you to see what I am talking about in LibreCAD you must first activate the polyline tool (not the arc tool) and then look at the top bar for a dropdown menu that initially says "Line" and change it to "Tangential". If you do that then you will see that it handles the straight segments just fine.

It is perfectly fine with me if the program converts closely approximate arcs to straight lines. That is the practical solution and is honestly a good thing to me, not a bad thing at all. I'm not sure what LibreCAD actually does in this regard, but it seems like it converts them to straight segments probably, since it clearly allows perfectly straight segments using the tool if you draw them on the grid to ensure it becomes so. I'm not sure how to display segment types in LibreCAD though. QCAD has better overall usability and informativeness and I'm not sure what LibreCAD's analog of QCAD's Property Editor for seeing what type of object a segment is would be.

In any case, defeatism doesn't help anyone and this feature would be extremely useful in some form in QCAD. It could even be expanded to offer multiple modes in a dropdown menu similar to like how LibreCAD does it and that would be even better probably since it would make QCAD's tools less rigidly locked into specific modes.

QCAD is overall much better software, but this feature would still be immensely helpful to have.

I don't care whatsoever whether or not many or even any other CAD tools have this. It is extremely useful and expedites creates good polylines very effectively and would be a wonderful alternative for vector art too. It should definitely be in the program in some form. It is strange to me that there are hardly any software packages that have this properly set up (LibreCAD is the only one I know of). Bezier curves in contrast have a tendency to wiggle and to get messed up and require a great deal of fiddling with, whereas this tool would handle many of those cases better for many types of expressive yet geometrically clean shapes.

I really hope the creator of QCAD reconsiders this and adds it in. The lack of it in the standard tool set is a gigantic lost opportunity.

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

Re: My #1 most desired feature: drawing tangent lines as easily and seamlessly as in LibreCAD

Post by CVH » Sat May 24, 2025 4:38 am

WraithGlade wrote:
Fri May 23, 2025 10:01 pm
You sound kind of like you are dismissing the idea I'm talking about as being somehow partially or completely unworkable or bad ...
Strange line of reasoning.
I implemented it for ArcTangential.js (shared in the 2023 Link) and for DrawPolyline.js (Privately) on my system.
I see it as a major update that was never adopted by the developer of QCAD.
For both the Arc method and the Polyline method.
Other methods for adding an arc-segment to a Polyline are probably equally valid. See the 2015 Link.

Repeating myself, ArcTangential.js is intended to draw one Arc and can not be used to draw a Line entity.
As is, it is a valid Arc tool ... Not really intended to extend a Polyline.
The same functionality may be implemented for adding Arc-like segments to a Polyline in DrawPolyline.js.
But it is OR, you need to adapt the tool option depending the intention.
Or adding a straight Line segment, or adding an Arc segment.
With simply indicating a next vertex there is no info if the segment needs to bulge or not.
WraithGlade wrote:
Fri May 23, 2025 10:01 pm
I really hope the creator of QCAD reconsiders this and adds it in. The lack of it in the standard tool set is a gigantic lost opportunity.
I the mean time it is picked up by Andrew and implemented for the next release.
See QCAD Changelog >v3.32.2

A fixed radius and/or sweep are still valid options.
Think of adding a 90° Arc with a given radius.

One limitation would be that a Polyline must start with a straight line segment.
For artistic art it may be required to start with for example a 3 point Arc, convert it to a Polyline (OC) and continue from that. :wink:
More options like in the 2015 link would then be handy.

Another limitation is at the same time being tangent to another entity.
The tangentially snap is considered as a straight from the relative zero what might be the last vertex in this case.
Current implementation only adds a center line as auxiliary shape on preview.
I added an auxiliary tangent XLine at the end of the new Arc segment what gives you an idea of the end direction.
Not really a perfect solution but you can attempt to nearly make it fit. :wink:
Two times tangent is typically only supported for Circles.

Regards,
CVH

Post Reply

Return to “QCAD Suggestions and Feedback”