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

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
Akash

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

-Pascal

Once you get the pulled curves exactly how you want them, you can replace the trimmed edges with the desired curves using this script: https://github.com/CADacombs/rhinopython/blob/master/xBrepEdge_replaceCurve.py

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…

-Pascal

1 Like

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

thanks a lot
Akash

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?

-Pascal

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.
-Pascal

Unfortunate that these tools can’t select the edges of surfaces, only curves… (and very seldom chained).

But, holy shit, this is the answer to my original question, the reason why I made this topic:

bild

So Split in V7 will get a way to force it to always pull a curve to its surface, but not Trim.

Yay!

(But once again, yet another example of inconsistent options between similar tools in Rhino…)

PS. Couldn’t get a result out of the command, btw… but looking forward to the day when I will.