Snap spline to line endpoint

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
Ken
Junior Member
Posts: 19
Joined: Sat Nov 25, 2023 9:41 pm

Snap spline to line endpoint

Post by Ken » Tue Nov 28, 2023 11:50 pm

Windows 10 & QCAD 3.27.8

I have lines that I manually entered the start points and end points. I then used the Spline tool and selected End points from the next tool in order to connect the curve line of the spline to the lines endpoints. It seems to not want to have the curve connect to the line the endpoints. I tried this with Snap>End and Snap>Free. Is there a setting I need to change? Or am I doing something wrong?

Oops, should this be in QCAD Troubleshooting and Problems?

Image
Attachments
qcad.jpg
qcad.jpg (96.3 KiB) Viewed 18507 times

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

Re: Snap spline to line endpoint

Post by Husky » Wed Nov 29, 2023 1:22 am

Hi,
which type of spline did you use?

1. Typ "Spline (Fit Points)" will snap to the end of a line.
https://qcad.org/doc/qcad/latest/refere ... ts_en.html

2. Typ "Spline (Control Points)" will not ..
https://qcad.org/doc/qcad/latest/refere ... ts_en.html
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..."

Ken
Junior Member
Posts: 19
Joined: Sat Nov 25, 2023 9:41 pm

Re: Snap spline to line endpoint

Post by Ken » Wed Nov 29, 2023 3:25 am

It was Spline Control Points that I used. And what I did was click on the end point of each line to complete the curve.

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

Re: Snap spline to line endpoint

Post by CVH » Wed Nov 29, 2023 8:02 am

Ken,
It is all in the name, isn't it?
A fitpoint spline is a third degree spline that goes trough all the indicated fitpoints. :wink:
Fitting the spline to an ordered set of points.

When created as open ended both spline types end 'normal' (relaxed, tangent) in the endpoints.

May I already remark that:
- If you trim or divide a fitpoint spline in a later stage then the spline(s) is (are) replaced by (a) control point spline(s).
-> This is to keep tangency at the trim or cut point other than normal.
-> You can not revert back to fitpoints.

- At high zoom it may only look like that a spline does not match with intersection points or for example endpoints of lines trimmed to the spline.
-> Due to how curved line-art is rendered, mathematically the intersection point or the trimmed end is correct.

Although control point splines are not really Bézier curves here you can see how they relate to their control points:
https://en.wikipedia.org/wiki/B%C3%A9zi ... tic_curves
A control point spline goes thus rarely trough a control point except the endpoints if open. :wink:

Regerds,
CVH

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

Re: Snap spline to line endpoint

Post by CVH » Wed Nov 29, 2023 11:41 am

petroben wrote:
Wed Nov 29, 2023 10:48 am
It seems like you might be encountering an issue with the spline tool in QCAD 3.27.8.
I am about certain that this is unrelated to the QCAD release and I am not aware of issues with the spline tools other than the minimal point count nor are there other issues reported, nor are there reported as being fixed in between.

"Snap to Entity" is not a snap mode, snapping "On Entity" (ST) is, although not best suited in this case.

The main difference is splines from control points or spline from fitpoints (QCAD PRO) as pointed out by Husky.
CVH wrote:
Wed Nov 29, 2023 8:02 am
A control point spline goes rarely trough a control point except the endpoints if open.

The endpoint of a line is an auto snapping point, the SnapToolsPanel should automatically be displayed when indicating fit or control points.
That is unless you have selected to snap otherwise in the snap panel or you have excluded endpoints from auto snapping.
For the latter see: Application Preferences .. Snap .. Auto Snap.

If there are many snapping candidates nearby the intended endpoint then you could activate (aka force) the End snap tool (SE).
From the posted drawing example I think this is hardly the case. :wink:

Regards,
CVH

Ken
Junior Member
Posts: 19
Joined: Sat Nov 25, 2023 9:41 pm

Re: Snap spline to line endpoint

Post by Ken » Wed Nov 29, 2023 10:09 pm

CVH,
I had to read what you stated multiple times to try to grasp what you are trying to explain.

So the fit points (blue) are the points along the spline that connect with the end points of the lines? When I select the spline, the control point is the first point (red) that is created when drawing the spline?

And the way that Bezier curves are rendered, I should not worry about the discrepancy between where the curve is drawn and the endpoint of the line?

Although being that multiple consecutive line endpoints appear to be not connected to the spline concern me as the true curve of the endpoints is not being represented by the spline curve.

Incidentally with the version of QCAD I have installed, I only see Spline (Control Points) in the tool bar.
2023-11-29 15_50_58-Sea King.dxf - QCAD.png
2023-11-29 15_50_58-Sea King.dxf - QCAD.png (5.53 KiB) Viewed 18317 times

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

Re: Snap spline to line endpoint

Post by Husky » Wed Nov 29, 2023 10:33 pm

Ken wrote:
Wed Nov 29, 2023 10:09 pm
Incidentally with the version of QCAD I have installed, I only see Spline (Control Points) in the tool bar.
You are using the Qcad Community Version!
The Fit points spline is only available in Qcad Pro.
You posted your question in the Qcad Pro section of this forum what means all our answers are based on feature of the Pro version.
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..."

Ken
Junior Member
Posts: 19
Joined: Sat Nov 25, 2023 9:41 pm

Re: Snap spline to line endpoint

Post by Ken » Wed Nov 29, 2023 11:03 pm

OK. Can a moderator move my post to the correct place?

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

Re: Snap spline to line endpoint

Post by Husky » Wed Nov 29, 2023 11:15 pm

Sure. Done! :wink:
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: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Snap spline to line endpoint

Post by CVH » Fri Dec 01, 2023 11:39 am

Ken wrote:
Wed Nov 29, 2023 10:09 pm
Although being that multiple consecutive line endpoints appear to be not connected to the spline concern me as the true curve of the endpoints is not being represented by the spline curve.
It should have been self-explanatory from the links provided by Husky.
https://qcad.org/doc/qcad/latest/refere ... ts_en.html
Drawing examples are provided in this link for open/closed quadratic and cubic.
Clearly the open splines only match at the endpoints.

In the tool icon not all the red dots are on the curve.
Very different with the tool icon of:
https://qcad.org/doc/qcad/latest/refere ... ts_en.html
Remark here QCAD Professional in the title bar.

For what it is worth.
With your projects and the effort, time and money spend, I think that a single user licence fee should not be problematic. :wink:

Regards,
CVH

Ken
Junior Member
Posts: 19
Joined: Sat Nov 25, 2023 9:41 pm

Re: Snap spline to line endpoint

Post by Ken » Fri Dec 01, 2023 7:31 pm

Thanks for the suggestion CVH. I just upgraded to QCAD Pro version 3.28.2. So now I am in the wrong forum again. :roll:

First, being new to QCad I did not notice the degree setting in the toolbar which default appears to be 3 for Spline(CP)

Second, Using the Spline(FT) is what I was looking for to connect the line endpoints, but those points need to be preciously placed in order to get the smooth line I am expecting.

I will have to continue playing with the more available tools in the Pro version. And be more adept at using QCAD Pro.

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

Re: Snap spline to line endpoint

Post by CVH » Sat Dec 02, 2023 11:56 am

Ken wrote:
Fri Dec 01, 2023 7:31 pm
First, being new to QCad I did not notice the degree setting in the toolbar which default appears to be 3 for Spline(CP)
The Option Toolbar ... Shared by many QCAD tools. Always keep an eye open for possible tool options and specific settings.

Degree 3 or cubic is most common, most practical. The math for higher degrees may become demanding.
Degree 2 or quadratic and then the curve will be tangent to the imaginary connection lines between control points. Each subset is a parabola.
Degree 1 is linear what are line segments connecting the control points ... Similar to a polyline with line segments.

Spline(SL) is always created in and limited to degree 3.

Both types are continuously smooth but per definition both do not have a steady smooth change in curvature with more points.
You can indeed define a hull shape with bulges, S-shapes, and so on ... :wink:
Less points is usually less troubled areas, less artifacts, ... But maybe also less proper fitted.

Regards,
CVH

Post Reply

Return to “QCAD Community Edition”