Adjusting curves between points they run through..how?


#1

Hi
V5
If I draw a curve through points using InterpCrv then hit F10 and alter the curve, it moves away from those points. I need to be able to alter it and have it still pass through those points whilst I do so.

How is this done ?

I use macromedia Freehand for 2D graphics and curves are placed with clicks and each creates a point with a see-saw handle. You can move the handle in and out and up and down and the handle on the other side of the point will move like a kiddys see-saw, You can also set the point type to straight line in and tangent curve out or vice versa.

You can adjust curves thus and they still adhere to the points. The curve drawing was so great to use.

I hit F10 in rhino and move the little squares sitting away from the lines and see that the curve has moved from my points I placed the curve through, clicking on those points as I went so I know with InterpCrv it went through them !

Steve


#2

Short answer: you can’t. Rhino’s curves are not the same as Illustrator/Freehands curves and the editing tools are different as well. There is no way to guarantee that after editing, an interpolated curve will still pass through all the points it was created with. Generally the ends are preserved, but that’s all.

Grasshopper is the only tool I know of in Rhino that can create an interpolated curve that will always pass through all the input points.

Edit: in a number of cases, however, if you turn on Edit Points (not control points) which should correspond to your original interpolated points; you might be able to edit the curve using those and still have it pass through the other edit points…

–Mitch


#3

Now to answer the question as to WHY Rhino’s curves are like that, it’s that those super-adjustable Freehand freeform curves are not of suitable quality for cutting steel, or making freeform surfaces for cutting steel, both because the math is lacking and because forcing curves to pass through exact points is exactly how you don’t make nice smooth shapes.

So editing NURBS curves is a bit of an ‘indirect’ process, but the results are fairer, and once you get the hang of it, much nicer. If you need a curve to pass through a certain point, your options are to break the curve at that point, or realize that a bit of point-pushing will get you within tolerance pretty easily.


#4

Hi Jim,
Having been told that FH curves were not up to the math required, I was pleasantly surprised when I opened a Freehand file of curves into rhino that they withstood massive zoom and were fine.

To be sure Rhino worked with the curves i drew new ones over the top but shape wise they were fine.

Steve


#5

That’s not how you check, you compare curvature graphs. See the “steps” in the graph, or sudden changes in direction? That means the curve is only internally tangent. That’s fine for a lot of purposes, but it’s not up to snuff for freeform shape creation.


(Wim Dekeyser) #6

Sidenote: it is possible to edit Rhino curves in an ‘illustrator/Freehand/CorelDraw’ manner by using the handlebars (hbar command). But because a Rhino curve is not a collection of 3-point Bézier spans, modifying the curve will not necessarily be limited to the area between three input points. Changing the lenght of the handlebar might get you there…


(Margaret Becker) #7

@Steve1

Does the HBar command do you any good?


(Wim Dekeyser) #8

If you’re asking me, Margaret, I never use it…
Perhaps @steve1 has tried it by now?


(Pascal Golay) #9

I tihink the only way to ensure that the curve continues through the points after edting is to InsertKink at each ‘through’ point and then point edit. You’ll see that sharp kinks easily develop at these points so it will be up to you to edit carefully and not get the control points on either side of an ‘anchor point’ out of line with its partner on the other side. It will be painful.

A quick way to insert the kinks all at once is to split the curve with the points and then Join the results.

-Pascal


#10

Hi Pascal,
My post about getting at the original handles would solve this.
the see-saw action of handles around a point disallow any kinks you warn of.

Rhino22 and myself require to get at the handles the user creates, I could plot my curve through my points that it MUST remain going through, then adjust the handles and with their see-saw nature they would allow correct curvature into and out of a point as they do when they first are used.

I have just drawn a curve through points that arc downward and yet I end up with two S curves in that. Now I wish to reach for handles and see saw the curve about the points THAT IT MUST GO THROUGH. I could lose those S bends in seconds, the alternative is more scary and pernickety.

I am to use InsertKink (its very name puts fear into my soul given what now happens in V5 sweep1rail, or graphs that see the curve depart my points.

The handle curve tool is just right, and its given us by rhino, so it is admissible to the system, but then we are not allowed back to the handles it first gave us, we get other ones where we dont want them.

What I am plotting requires handle curves then the ability to return to those handles. I could have done the job by now but I know that its not possible to get at those handles I first se-sawed, I get other ones I dont want. As such I need to keep the curve through the points and so must enter kink territory. Handles dont do kinks.

Steve


#11

How would half a handle-bar suit you Steve?

If you follow Pascal’s suggestion and split your curve at the desired points with a click to the curve and a window to the points, very fast, and then _BlendCrv between the resulting segments and join the result. This will give a nice clean curve with G1 continuity at the points if you use the tangency option.

You will need to add points to the start and end of the curve, then extend by a reasonable distance before you start, then split at these ends in order to use _blendCrv at the end segments of the original curve.

If you are fine-tuning, it may be useful to set the nudge distance as req’d and use the nudge arrows for your adjustments. - Edit, sorry, just tried this and nudge doesn’t work during BlendCrv, but certainly does on the control points of the resulting smooth curve.


(Wim Dekeyser) #12

Also, since you know which points the curve has to pass through, you can just place points in those locations and snap the hbar to these.


#13

Edit: in a number of cases, however, if you turn on Edit Points (not
control points) which should correspond to your original interpolated
points; you might be able to edit the curve using those and still have
it pass through the other edit points…

just did experiment with EditPoints but curve departs the points I wish it to still run through.

also Hbar allows curve to be dragged/snapped to Pt5a but it also departs the other Pts. My heart was uplifted as I saw what Hbar gave, the ability to move the curve and snap to 5a, but sank when I saw the rest had shifted.

I am trying to understand what the steps are here.

Please edit my steps if I havent grasped whats being explained.

see attached test piece.

Lets say I have a curve running through 10 points that were drawn left to right (placed using points tool), lets number them 1 to 10 in draw order, left to right. Call them Pt1 Pt2 etc , they are points on opposing curves that the curve must pass through.(orange)

I need to alter curve between Pt4 and Pt6 to a new position for Pt5 point called 5a

  1. split the curve at Pt4 and Pt6

You will need to add points to the start and end of the curve, then extend by a reasonable distance before you start, then split at these ends in order to use _blendCrv at the end segments of the original curve.

do you mean add control points ? then extend curve…and would that be by arc ?

  1. Activate curve that starts at Pt1 and type InsertControlPoint and click on it at Pt4
  2. Choose ExtendCurve by arc and extend this curve at Pt4 “by a reasonable distance”.

then split at these ends in order to use _blendCrv at the end segments of the original curve.

  1. use split command on the end of these extensions

Cant see how one can split an end.

My test example attached. In which I need to alter curve to Pt5a keeping path through the other points to retain intersection with the orange curves.

It will then at Pt5a intersect with the brown curve, added later on (reason for the change).

Drawing it thrpugh Pt1 to 10 now via 5a with InterpCrv sees little change in CurvatureGraph.

What are the numbered steps to achieve this using split and extend and BlendCrv and so on ?

or ideally a Jing video. as its something I am sure others will face.

EditCurveRetainPaths1-4and 6to10.3dm (44.7 KB)

Cheers

Steve


(David Cockey) #14

Here is a method to locally modify a cure so that it will go through a point, will be un-modified outside of a local region, and have G2 continuity throughout:

  1. Use Trim to remove the portion of the curve to be modified. If it the part of the curve between two points then use those two points as the trimming objects.

  2. Use BlendCrv (not Blend) to create two curve segments between the trimmed ends of the original curve and the point the revised curve is to pass through. Do not join the new curve segments to the existing curves.
    a. BlendCrv
    b. Select one trimmed end of original curve.
    c. P for the Point selection option in BlendCrv and select the point the revised curve is to go through.
    d. Make sure Continuity is set to Curvature and Join it not selected.
    d. Enter to complete command.
    e. Repeat using BlendCrv to create a segment from the other trimmed end to the point.

  3. Use Match to adjust the two new curve segments so the have continuity match with:
    Continuity: Curvature
    Preserve other end: Curvature
    Average Curves: checked
    Join: not checked
    Merge: checked

  4. Use Match to join the new curve segment to one trimmed end of the existing curve:
    Continuity: Curvature
    Preserve other end: Curvature
    Average Curves: checked
    Join: not checked
    Merge: checked
    Repeat to join the new curve segment to the other trimmed end of the existing curve.

Example: LocalModDC.3dm (110.8 KB)


#15

There are different ways of doing most modelling but to respond to your example:

I’ve led you astray with this, I meant add a point object if there wasn’t one already there and extend (type=natural) the original curve by a distance (I used 20mm here) to give you something to blend with if you were to repeat the above operation at the end of the original curve - i.e split at 1 and 3 and use the extension for the blend operation which will maintain the G2 continuity at the end of the original curve - then delete the extension. Just another way to do it…


#16

Might I suggest the Level II coursework!

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

-Sky


#17

Thanks for the link Sky, full of great methods and makes a fine reference manual :smile:


#18

Thanks all,
David,…your method I followed and understood all.
It differs from Brians with use of Match and I dont get the 1 and 2 columns selectable

Brian M…
understand Origin Curve (my blue curve…) split at 4 and 6 (same as David step 1) but split not trim

What is the guide curve though ? I see a magenta curve that I didnt have. and why is it split at 5 ?

New segment with blend curve in white is as david but you manage to have columns 1 and 2 active and different settings.

Following your method then, having split the blue curve at 4 and 6, I then run BlendCrv and pick Blue 1-4 near 4
then do I type P and pick Pt5a (same as dvid, but I get only column 1 active) why did david use continuity and you tangency ?

You repeat this for 6 to 5a I presume, then you say join .

david used Match.

skyg many thanks indeed for the link, I am itching to follow that all through and understand it.

exercises to follow just what I enjoy and promote for training.

Is there a list of these with models somewhere for V5, Cplanes and gumballs two other areas I need.

Steve


#19

The magenta curve is on your drawing - on your layer named ‘ReDrawn using InterpCrv’ and I described it as a guide curve, for want of a better word, as it looked like that is how you wanted your blue curve to end up at that location, hence the split at 5 for the _BlendCrv method described above, i.e. blending into the split magenta curve instead of using the Point option - just another way to do it.

Using the curvature option in _BlendCrv will give a smoother transition G3 connectivity, your choice governed by the result you’re looking for - try the various combinations, best way to learn.

As I said before, there is usually more than one way to achieve a result, so use our suggestions as a guide and follow through with your own trials. I suspect, with your 14hr days x 7/wk, you’ll be telling us how to get things clicking before long…


(David Cockey) #20

[quote=“BrianM, post:19, topic:9204”]…

Using the curvature option in _BlendCrv will give a smoother transition G3 connectivity, your choice governed by the result you’re looking for - try the various combinations, best way to learn.

As I said before, there is usually more than one way to achieve a result, so use our suggestions as a guide and follow through with your own trials. I suspect, with your 14hr days x 7/wk, you’ll be telling us how to get things clicking before long…
[/quote]
Curvature continuity is G2, tangency continuity is G1.

I used curvature continuity (G2) so that the altered segment of curve could be merged with the two segments of the original curve, with the result being a single cubic B-spline without kinks. If the continuity between the altered segment and the original segments was only tangential (G1) the result of joining the curves be a polycurve with curvature discontinuities between the segments.