Measure Along a Spline

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
Paul-in-Sussex
Newbie Member
Posts: 6
Joined: Fri Apr 28, 2023 4:12 pm

Measure Along a Spline

Post by Paul-in-Sussex » Thu May 11, 2023 3:08 pm

Hi all
Could someone tell me how I measure a section of spline curve?

I am trying to extract panel shapes for a boat. To do that I need the distance along a curved line between two stations (not the straight-line distance) to extract the panel shape.

Any input welcome

Paul

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

Re: Measure Along a Spline

Post by CVH » Thu May 11, 2023 4:37 pm

Paul-in-Sussex wrote:
Thu May 11, 2023 3:08 pm
Could someone tell me how I measure a section of spline curve?
This can be problematic when it needs to be exact.
You need to trim or break a copy of the spline at those specific points.

When it is a Fit Point Spline, it will turn into a Control Point Spline segment.
This is to keep the start and/or end tangents correct.

The Property Editor will tell you how long this spline segment is.
If the type changed, it will not be utterly exact.

e.g.: Fit Point Spline 276.74707515 long chopped in two:
154.02468118 + 122.74355039 = 276.76823157 long what is +76.45ppm longer.

Any method that explodes the spline into a polyline will be less exact.
The polyline is only an approximation.

Regards,
CVH
Last edited by CVH on Thu May 11, 2023 7:47 pm, edited 1 time in total.

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

Re: Measure Along a Spline

Post by Husky » Thu May 11, 2023 6:44 pm

@Paul
Paul-in-Sussex wrote:
Thu May 11, 2023 3:08 pm
I am trying to extract panel shapes for a boat. To do that I need the distance along a curved line between two stations (not the straight-line distance) to extract the panel shape.
With this typ of project that is most likely a Fit Point Spline. I use that all the time on my Kajak build's ...

How to:

1. explode (XP, one time) the spline. This will convert the spline into a polyline. Yes, mathematically it will affect the total lengths but I doubt that you will notice any difference ...!
2. divide this polyline at the stations with Divide (DI),
3. select the part between those station and read the lengths in the Property Editor below "Specific Properties".
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: 3419
Joined: Wed Sep 27, 2017 4:17 pm

Re: Measure Along a Spline

Post by CVH » Thu May 11, 2023 8:19 pm

Husky is right.
Avoid spline lengths, this 'kayak' shape in mm has the same contour length as its center line:
SplineLength.dxf
(97.26 KiB) Downloaded 156 times

That is not the case for the identical shape in inches: 198.122in (5032.30mm) vs 196.850in (4999.99mm)

So everything depends on the drawing unit. :shock:
And certainly on the approximation tolerance, a tolerance of 0.1unit is 25.4 times larger (coarser) in inches than in mm. :wink:

Regards,
CVH

Paul-in-Sussex
Newbie Member
Posts: 6
Joined: Fri Apr 28, 2023 4:12 pm

Re: Measure Along a Spline

Post by Paul-in-Sussex » Tue May 16, 2023 11:13 am

Hi
Apologies for slow response from me - I assumed I would receive an email if anyone replied.

I have a vessel of 70 ' LOA modelled in full size using Deltship Pro (actually someone else kindly did the modelling - it is beyond me).

I extracted the lines drawing as a DXF - still full size.

I intend to model the vessel at 1/16 scale.

First I need to correct an error in the original modelling and then extract the hull panels again. I have two sets cut from 0.9mm Zintec for prototyping purposes but as I say there are issues.

Thanks to your kind replies I think I can measure along curves. The hull is modelled in feet and inches because that is how it is drawn. Should I extract panels in mm or inches? I didn't quite fully understand the comments regarding units.

Kind regards
Paul

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

Re: Measure Along a Spline

Post by CVH » Tue May 16, 2023 5:16 pm

Paul-in-Sussex wrote:
Tue May 16, 2023 11:13 am
Should I extract panels in mm or inches? I didn't quite fully understand the comments regarding units.
Well that is an issue I am still investigating.
It seems that with large numbers and faint curves there is something wrong with the displayed length of splines.
The example given measures 5000mm at the center line and the spline is said to be 5000mm long too.
Obvious it isn't, see SplineLength.dxf
When I convert that to inches all seems fine, the shape is exactly the same but the numbers are 25.4 times smaller.

There is no issue with the length of polylines.
You should use an approximation tolerance that is appropriate but doesn't return a polyline with too many segments.
See Application Preferences .. Modify .. Explode

Regards,
CVH

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

Re: Measure Along a Spline

Post by Husky » Tue May 16, 2023 9:40 pm

@Paul
Paul-in-Sussex wrote:
Tue May 16, 2023 11:13 am
The hull is modelled in feet and inches because that is how it is drawn. Should I extract panels in mm or inches? I didn't quite fully understand the comments regarding units.
Yes I agree - the comments regarding the units are confusing. I don't think that is a relevant information regarding your project.

To keep it real - this is how I would tackle the project:
mm / inch doesn't really matters for a scaled model. Stick to what you are most familiar with. I would do it in metric ...
Export the drawing in 1:1 from Deltship Pro as dxf.
If you decide to work in imperial - convert (CU) the drawing in QCAD to the desired unit.
Do also the scaling (1/16) in QCAD. The scaled drawing will then be the new 1:1 for the model.
is your plan to cut it in 0.9mm Zintec with a CNC? Anyway - what ever the cutting method will be use the model of concept to correct eventually little errors in the drawing.
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..."

Paul-in-Sussex
Newbie Member
Posts: 6
Joined: Fri Apr 28, 2023 4:12 pm

Re: Measure Along a Spline

Post by Paul-in-Sussex » Mon May 22, 2023 8:53 pm

Thanks Husky
I hope to get back to this tomorrow.
All the best
Paul

Post Reply

Return to “QCAD 'How Do I' Questions”