Rhino WIP Feature: Patch re-implemented

Perhaps the developers could implement a smart solution. Keep all user settings during the current session (unless they are changed again), but “Refine” should be off when the input geometry is not 4-sided (Domain: Untrimmed). Usually the untrimmed surfaces have a much less complex structure, hence they are quicker to calculate.
And vice versa - when the Domain is not “Untrimmed” (typically when 3, 5 or more input edges are used, involving trimming), “Refine” must be off to allow a quick change of the other settings.

@Rhino_Bulgaria @menno Yes, I was thinking it would be useful to have something like a “lock” icon at the top: when it’s disabled, every time you start the Patch command all settings reset; when it’s enabled, it keeps the user-defined settings from the previous session. What do you think?

I would like to have such an option. After all, some tools in Rhino already allow keeping the custom settings for the current session.

Got it. RH-95147

I can’t see it :slight_smile:

:person_facepalming: Forgot to make the ticket public.

Thanks! :slight_smile: It’s visible now.

@menno Would it be possible to add an automatic option for setting the U and V spans at the start, maybe again as an icon at the top?
That way, the command could automatically detect how many spans are needed based on my tolerance settings, making the process faster and more automatic.
Then, if needed, the user could still adjust the spans manually afterwards.
For example, in XNurbs I don’t actually choose the spans directly: the command sets itself automatically according to the quality level I want to achieve.


For example, here: if I use “Refine”, is it performing the kind of process I mean?

But if Refine is off and I want to reach, say, G1 continuity with cleaner/more organized spans, is there a way to do that automatically—without having to manually add or remove spans myself?

A maximum angle deviation indicator will be welcome, too. Or simply enable an automatic “Edge continuity” for the preview of the involved edges while running the “Patch” tool.

Imagine that the “G1” indicator at the bottom of the pop-up panel fails, but the angle itself is just 1% worse than the file tolerance settings. That’s still acceptable, but the user does not have idea about the actual deviation unless the command is finished. That way, the user is forced to use much denser settings, then complete the command. Then, he or she have to run the “Edge continuity” tool to check the angle deviation, only to figure out that it was good enough even with less strict settings.

Try the top left button.

I have Rhino 7, but now that you mentioned that button on the upper left corner, I can see that it’s for running either the “Edge continuity” or “Global edge continuity” tool. It’s quite nice that you already included that! Thanks! :slight_smile:


PROPOSAL 1:
I have another proposal, inspired by my usage of the “Match surface” tool. Is it possible to make the “Refine” button targeting either G0, G1 or G2? For example, when I use “Match surface” with the “Refine” option, G1 and especially G2 may produce a very dense surface. However, if I run “Match surface” with G0 and “Refine” simultaneously, then run the tool again with G1 and “Refine” turned off this time, the output surface is only slightly refined to comply with the distance setting (G0) while also achieving almost G1 (with a slight deviation from the ideal target angle setting).


PROPOSAL 2:
Also, I had another proposal in a few other topics (mainly related to “Blend surface”) regarding another type of refinement. This time, it’s based on “Minimum distance between spans”, for example, prohibiting the generation of spans less than 2 mm from each other. That will ensure that the output surface will never have too dense spans (at the cost of some slight deviation). Sometimes Rhino builds 10-50 spans stacked in less than 1 mm total distance. If this could be eliminated, the surfacing will be far easier.

It could easily fix the issue seen in the last image of @brvdln a couple of posts above.

@brvdln
We tried to hide away settings that you don’t necessarily need to adjust in the dropdowns. I assume that the tolerances need to meet your file tolerance and that is what it defaults to.

With the two drop downs collapsed, all you need to turn on is ‘refine’ and that will add additional spans where needed automatically. Adding spans manually should not be necessary for the general case.

@Rhino_Bulgaria re your proposal 1:
Patch will always try to match as good as possible. So even if you set a high angle deviation it will still try to match to 0 degrees. So if you don’t need g1 refinement, simply increase the angle tolerance and check your results with GlobalEdgeContinuity.

Is there any chance to get a “Minimum distance between spans” option for “Patch” in Rhino 9 (no waiting for Rhino 10)? This option alone will ensure that the issue with having a huge amount of unwanted multi-spans concentrated in a tight area will be finally resolved.

@Gijs Yes, there is this “quality control” option, but I’ve never clearly understood what actually influences it—whether it depends on the file tolerances or something else. In any case, it behaves similarly to Patch’s “Refine”: as you increase the quality, the spans become less uniform and tend to increase near the edges.

I’ve never figured out exactly what that quality slider does, but it is not the same as refine.
More equivalent to refine is the checkbox ‘satisfy precision requirements’.

We’ll need to think about that one. What is currently possible that goes a bit in that direction is to use the scripted mode of the command, which allows you to set the number of refinements. In the interactive mode, the maximum number of refinements can not be changed. Using fewer refinements will on the one hand make it more difficult to create a patch that meets all the constraints, but on the other hand reduce the chances of getting very narrow spans.
The refinement process works by identifying which spans do not meet the constraints and inserting a knot mid-span. If this happens a few times the one span can be split into many refined spans.

I believe that the best approach is to allow a loose setting for G1 that aims to deliver G0 within the set tolerance with the bare minimum of spans, even at the cost of losing an actual G1 tangency here and there.

Matching a surface to a split edge with the “Match surface” tool is a clear example of the effectiveness of this loose approach. Matching to G0 with the “Refine” option, followed by another matching with G1 (without refinement this time) gives a far cleaner result that directly matching to G1 with refinement on. The tangency may become G0,9 or similar, but the spans are a far lesser number.

Hi @menno

Usually, I don’t use the OK button to exit a panel; I just press the right mouse button. However, this doesn’t work with the Patch panel. For example, in the FilletSrf panel, the right mouse button works to exit the panel. Thanks