Need alter a best fit curve through points keeping first and last points at its ends..how?


#1

Hi,
V5
I have a curve of points I wish to best fit a gentle very shallow arcing curve through, but it must start on the first point and end on the last point.

Q1) How is this done ?

I have used ControlPointCurve tool and drawn snapping to each point but I want to get the subtle wriggles out of this now. ( I could also have used right click on that tool and curve through points)

Q2) Also if with that shallow arcing curve drawn as such, I wish to alter its shape a little still keeping it arcing and gentle and smooth, and again it must start and end on the points, how is this done ?

F10 and pulling on the controls loses the smooth sweep, one is attacking parts of the curve without regard to its overall curve.

If I had drawn it in Freehand with its curve tools I could simply pull out the handle for the start of the curve and the whole curve would adjust.

The handles curve tool does not see the same handles show up when one edits a curve. (separate post on this discovery somewhere)

Q3) I also sometimes need to draw a best fit curve through points starting and ending tangent but the only curve tool I know that has start tangent doesnt do best fit. InterpCrv

Steve


#2

If you’re just trying to smooth the curve out a bit, you might try using Rebuild and playing with the number of points, watching the deviation and the on-screen display - keep the points to the minimum you can. Under Rebuild, the end points do not move.

Otherwise there are also the commands Smooth and Fair, to be used in conjunction with CurvetureGraph, perhaps. End points also stay in place with those.

–Mitch


#3

Hi,
I shall give that a try.

done so,

I am in top view, Y is the direction it needs smoothing in, trying 0.5 Smooth causes both ends of curve to kick out and curvature graph starts off looking fair and showing a shallow S and I need a shallow arc. then using smooth 0.5 and graph looks a lot worse.

Rebuild wouldnt lose the S curve nature and give me the shallow arc.

try fair, started with default tol 10. no good, though graph stays flowing, but indicates an S curve.

Now having tried 20 then undo then 50 then undo…etc on 300 and still an S curve. Will it in time lose the S, its shallow but there., or is Fair never going to do that ?

The answer I think lies in Q1…still wondering though on Q1) How does one draw an arcing curve through points as opposed to the S or multiple S curves that Control Point Curve gives ?

also Q3)

and Q4 an additonal question, why isnt there an arc best fit through points command ?

I have spent hours trying to draw arcs through points, just realised thats what I need, MORE ACCURATELY THOUGH… my arcs are not a constant radius, so a way of drawing curve through points but constraining the curve to an ‘arching’ type curve , as opposed to an S type curve…C type not S type !

Steve


#4

If you need a shallow “arc” why not Rebuild the curve with degree 2 and 3 points, then in Top view use the middle control point to adjust the arc as you like…

–Mitch


#5

Hi,
have added my finding and Q4 to my post.

Tried Rebuild 2 and still had the S curve.

Ah Degree 2 and 3 points, that gives me the visual control and kills the S bend.

I need to understand deg 2 and deg 3 curves more.

I see deg 1 is linear, deg 2 one bend and deg 3 S bend.

Understood.
didnt know one could kill an S with deg 2 and rebuild.

Steve


#6

Degree 1 = linear
Degree 2 = quadratic (conic sections: arcs, circles, ellipses, parabolas, etc.)
Degree 3 - cubic

In NURBS you must have a minimum of degree+1 points for any given curve; exactly degree+1 points makes a single “span”. More points than degree+1 will create a multi-span curve.

If you have a degree 2 curve with 3 points it can only be a conic section, which to my knowledge cannot have an “S” form.

–Mitch


#7

Thanks,

still hoping to hear from someone on :-


(Margaret Becker) #8

I think you are going to have to post a file with a sample of the points you are trying to use.


#9

Hi,

I am well and truly up against time right now but these very simple queries dont need illustrations, surely ?

this should be easily imaginable in the mk1 brain though I had thought…

take a pencil and paper and draw a shallow arc with a sweep of the wrist, then stab at it quickly with your non writing hand and the pencil along the arc, those are our points.

now draw a degree 2 curve through them as best fit.

How is that done ?

All I can find are tools that create a deg3 curve best fit and I get an S curve as some of those points allow for such a fit.

Can a deg2 be drawn ?

aha I spy degree option in the control point curve and so enter 2, expecting my plotting through the points to generate a single bend curve, but get a deg 3 curve, many S’s ! i.e its a wiggly curve !

so how does one draw a best fit curve which is a single arc type curve through points that have a bit of an S curve shape about them ?

Does question 4 why isnt there an arc best fit through points command need a drawing of an arc and some points it fits through. If there is a circle through points command, why isnt there an arc best fit points command ? No drawing needed for that surely ?

Steve


(Margaret Becker) #10

Well, they do, if you want an answer that fits your situation. Otherwise we can make something up that works perfectly, but isn’t anything like what you are describing.

Curves that don’t have a constant radius are NOT arcs. If your points are not arranged in an “arching” shape, then drawing a curve through them won’t arch either.

Have you tried InterpCrv?


(Pascal Golay) #11

Hi Steve- use Circle > FitPoints and then trim the result to taste using SubCrv.

Then move the control points if needed. There is no best fit with X number of points - at some point you will need to estimate.

-Pascal


#12

Hi,
I realise that an arc is a set radius.

circle through them then trim gives the arc, cheers Pascal.

but still, not peculiar to my work, but thousands must come across such,

points forming a sort of curving line,

such curves as would be a profile for an aircraft fuselage cross section top to bott. or roof of car.

my pencil and stabbing of points along a quickly drawn gentle single arching (not arc) curve, you call it a deg 2 curve.

How does one draw a best fit curving line through these stabbed points. avoiding it having S bends.

okhere is a quick drawing of some spots and a S curve and a C curve, I want C curve command best fit C curve through points.

dont know how else to ask what is simple to me .

c curve has one arching type look to it, can be very shallow, deg2 or whatever. its called

Steve


(Pascal Golay) #13

The Fair command is what comes to mind here- it is designed to smooth out rapid changes in curvature. Give it a larger tolerance, or use repeatedly at a smaller tolerance (probably better result)

-Pascal


#14

Just for the intellectual exercise, I wrote a script that allows you to create a “best-fit” arc through an arbitrary set of point objects. You need to select the arc start and endpoints in the first pick, then all the rest in the second. It then calculates the entire set of 3 point arcs possible (one through each intermediate point that was selected), gets the average radius of all, and runs an arc of that radius between the start and end points.

For your amusement pleasure…

–Mitch

AverageArcThruPoints.py (2.3 KB)


#15

Steve1 -

You should do the Rhino Level II coursework:

http://www.rhino3d.com/download/rhino/5.0/Rhino5Level2Training/

-Sky