Distance along a curve

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Distance along a curve

Charles P
I need to place points along a curve, whose location is not defined by x,y or in a straight-line distance from the previous point, but distance along an irregular curve. Is this possible? Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

dxli
Yes, but not by Snapping, unless it's exactly at 1/2, 2/3, etc. when you can use "Snap Middle Point" and choose the total number of middle points. (Say, 1 point at 1/2, or two points(1/3, 2/3), etc.).

In other cases, you can trim a curve by the length to the original end points. The tool is by Menu:

Tools > Modify > Lengthen

Then, you can input the length from the end point to the desired point. negative/positive mean trimming/lengthening

If you want the original curve, you can make a copy before running Length.



Charles P wrote
I need to place points along a curve, whose location is not defined by x,y or in a straight-line distance from the previous point, but distance along an irregular curve. Is this possible? Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

flywire
In reply to this post by Charles P
Charles P wrote
I need to place points along... an irregular curve.
Is it a spline?
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

Charles P
Thank you for the two replies.
Yes, it is a spline.
However, when I select the T>M>Lengthen option, the curve is not able to be selected - my guess is that only a straight line can be selected for this operation.
I also tried dividing the curve at approximately the desired length (25mm), but this is guesswork as there is no display of the length of the curve until the operation is completed and the new curve is selected. Once again, the new, shorter curve is not able to be selected for lengthening. Whilst I can attempt to select the end point of the curve and drag it manually, the length is not displayed until I release the mouse button and so it becomes a guessing game with no option for precision.
What I was hoping for is a menu option that allows for a point to be selected on an object a distance from another point on the same object. I must admit I am not a CAD professional so I don't know if such an option exists on any CAD program.
As a less perfect but acceptable option, how would I place a point on the curve that is in a straight line distance from the origin point? Create a 25mm straight line and move it from point to point? Sounds like a cumbersome operation even if it can be done.
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

perepujal
Charles P wrote
As a less perfect but acceptable option, how would I place a point on the curve that is in a straight line distance from the origin point? Create a 25mm straight line and move it from point to point?
Beter a circle/radius with the desired distance then trace a line from center to crosing with spline, or more precise with more work, 10 circles with radius 1/10 the desired distance or 25 circles with 1/25 radius or...
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

LordOfBikes
Administrator
In reply to this post by Charles P
Spline support is very limited in LibreCAD.
They can be drawn or opened from existing files, but when it comes to modification many tools don't work.

For an exact straight distance usually a circle is used. Then  the intersection is the desired point.
But, I just tested it, this doesn't work for splines too, neither does Snap on Intersection work nor can I divide the spline near the intersection.

Depending on the quality you need, you can try this:
- save the drawing in R12 format (keep a copy in DXF2007!)
- close and reopen the R12 file
- the spline is now just an approximation, a polyline with straight line segments
- explode the polyline, because polyline has similar restrictions
- now you can measure and lengthen, or divide the segments at desired points

If you mark the points in the R12 file, you can copy/paste them back into the DXF2007 file.
You probably still can't divide/shorten/lengthen the spline, but it may help anyway.

This R12 trick works, because DXF R12 doesn't know splines or ellipses and on save they are converted.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

perepujal
LordOfBikes wrote
For an exact straight distance usually a circle is used. Then  the intersection is the desired point.
But, I just tested it, this doesn't work for splines too, neither does Snap on Intersection work
Strange, snap intersection works for me between circles and splines, it has its quirks but in the small tests I did it worked.
This is in Linux in both a self compiled 2.2.0-2-gf55f341e and in an old 2.1.3

Pere
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

Charles P
Thank you for all the replies, the circle method worked with some goading. I placed 12.5 radius circles along the spline with intersections being the snap option, interestingly the snap worked along the spline where the previous circle intersected with it except for one point, which I can't work out why. Here I used the "Snap on Entity" option and approximated the intersection manually.
Then I deleted every second circle to end up with 25mm dia full circles, and was able to divide the spline at each circle intersection. Measuring these individual spline segments I found that they were all under 1mm over my target 25mm length, which is fantastic! This was a great solution.
BTW I am using Windows 10 and LibreCAD 2.2.0.2 (installed only last week).
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

dxli
Have you tried spline points?
Charles P wrote
Thank you for all the replies, the circle method worked with some goading. I placed 12.5 radius circles along the spline with intersections being the snap option, interestingly the snap worked along the spline where the previous circle intersected with it except for one point, which I can't work out why. Here I used the "Snap on Entity" option and approximated the intersection manually.
Then I deleted every second circle to end up with 25mm dia full circles, and was able to divide the spline at each circle intersection. Measuring these individual spline segments I found that they were all under 1mm over my target 25mm length, which is fantastic! This was a great solution.
BTW I am using Windows 10 and LibreCAD 2.2.0.2 (installed only last week).
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

Charles P
Spline points? Not sure I know enough about them.
The spline was arrived at by setting points on given x,y coordinates, and consequently I need to set points on the spline that are a given distance (25mm) from each other along the spline. These points aren't coincidental with the x,y points.
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

dxli
We have the common spline support defaulted to cubic splines, and independently there's a SplinePoints type by quadratic splines. More features are supported with SplinePoints.

BTW, we may also adding feature support for cubic splines.

Charles P wrote
Spline points? Not sure I know enough about them.
The spline was arrived at by setting points on given x,y coordinates, and consequently I need to set points on the spline that are a given distance (25mm) from each other along the spline. These points aren't coincidental with the x,y points.
Reply | Threaded
Open this post in threaded view
|

Re: Distance along a curve

flywire
In reply to this post by LordOfBikes
I've been there. I started the cattle yards with a quarter circle arc but then realised the x and y offset was different so it was an elipse arc. The inner arc had to be adjusted to a multiple of panel sizes. An open spline requires 4 Points for 3-point splines.

LordOfBikes wrote
For an exact straight distance usually a circle is used. Then  the intersection is the desired point.
But, I just tested it, this doesn't work for splines too, neither does Snap on Intersection work nor can I divide the spline near the intersection.
It seems snapping to an intersection with a spline is unreliable, I snapped to the circle estimating the spline intersection within a tolerance.

Drawing a circle and then snapping a line is really clunky. What is really required here is to draw a line, say horizontal (given the angle is zero) with a given length with rotation turned on. The first point is the rotation point and the second point is the reference point. I imagine users could define that tool in lc3.