How to force trim to always pull curves to its surface?

Lets pause and clarify some terminilogy.

What do you mean by G2 curves? Are you referring to Degree 2 curves?

G2 refers to continuity between curves or segements/spans of curves. Curves are not typically referred to as “Gx”

Degree 2 NURBS curves have G1 (tangency) continuity between spans (unless there are multiknots or stacked control points.)

If you trim with Degree 2 curves the resulting edge will generally have segments with G1 continuity between segments.

1 Like

I don’t see this in practice.

I’m talking only continuity here, as I thought the curvature combs demonstrated.

At no point, neither in the Alias video, nor in the Rhino video, do I inspect the control point/spans (not counting what happens automatically in Rhino when you edit a blend surface).

(I’m beginning to think that the videos aren’t playing for some people. Is that the case?)

Not True. In general a surface with G2 or better continuity (degree 3 or higher) when trimmed with a curve with G2 continuity (degree 3 or higher) will have edges with G2 continuity. The same surface if trimmed with a curve with G1 continuity (degree 2 or higher) will have edges with G1 continuity.

@eobet Please upload a .3dm file (not .stp) with the surfaces which are causing problems. I have an idea of what is causing your problems.

Ok, it’s late, but I’m looking forward to being educated tomorrow! :slight_smile:

The step file shouldn’t make a difference, but the 3dm can be found here.

Both, the “Trim” and “Split” commands heavily depend on the file tolerance settings. They do produce quite different results if you change the tolerance. I already described the issue in the following topic: Dual tolerance option in Rhino?

By the way, I did a continuity check of your file and it says that the edge continuity between the cutting surfaces is G1.

1 Like

I found the same thing. G1 continuity between the cutting surfaces, which result in G1 continuity along the cut edge. Not a surprise.

Ok, this is potentially exciting because I’m about to learn something new about Rhino that I hope will make things “click” for me: How did both of you reach this conclusion? Can you post screenshots?

(Yes, it might seem obvious to you, but I might be in too deep water to even see the surface.) :slight_smile:

Correcting what I posted earlier.

Looking at just the “trimming” surfaces and using Zebra and CurvatureGraph shows the surfaces to have G2 continuity between them.

However duplicating the edges and extracting isocurves, and then using GCon and CurvatureGraph shows the edges and isocurves of the two curved surfaces to have G1 continuity between them.

Extending the trimming surfaces and IntersectTwoSets with the other surface results in two curves as expected. One curve has multiknots. The two curves which are close to but not quite exactly G2.

Projecting or pulling the edges with G1 continuity between them onto the other surface will result in G1 continuity between the projected/pulled curves unless there is a particular alignment of the curves with the surface.

The continuity you are seeing may have several causes: the edges are not actually G2 continuous, and/or the projected/pulled curve and trimmed edge can not be exactlyr represented by a NURBS curve so Rhino creates an approximate curve within the tolerances. With multiple curves or surfaces each curve or edge is approximated individually and the approximations together may not have quite the continuity which the theoretical solution would have.

Hi Pascal
can this Macro be altered in a way that it also works on Mac?

thanks a lot

Hi Akash - I do not see a good way to do this via macro on a mac.


Once you get the pulled curves exactly how you want them, you can replace the trimmed edges with the desired curves using this script:

I don’t know if this is possible in the UI. _ReplaceEdge with _Mode=SelectCurve often creates an edge that is an approximation of the input curve.

VSR for Rhino 5 has an excellent command called “Edge approximation” that makes it possible to replace a trimmed edge with a much simpler version within a custom set tolerance. It lets you build simpler adjacent surfaces. Maybe someone who has Rhino 5 + VSR could upload a video of it in action? @ sgreenawalt ? :slight_smile:

Use RefitTrim for this in the V7/WIP…


1 Like

Hi Pascal.
I understand… not why only that it doesn’t work on that different way setting is implemented .

thanks a lot

This sounds super interesting, although unfortunately I only get “RefitTrim failed” when I try on the example I posted above.

RefitTrim needs a single all-the-way across trim. In your CurveNear file, I see no trimmed edges, correct?


Right, but in this thread I used the edges of those surfaces to create the trim, like this.

But are you saying that RefitTrim can’t handle split edges? That would be a shame if so.

Hello - currently, that is correct- my guess is it can be improved, but at the moment the command accepts a single edge.
TestSplitRefit can help, probably, here, if you dup and join the edges.