This is the single-click MatchAround command that was requested multiple times during the years. It may appear in Rhino 10 or 11. It works automatically by searching for the closest adjacent surface edges within a set distance (customizable).
Happy new year!
It would be good to first understand what you expect to happen in various scenarios. In general this could work well in a multi match situation where the surface is matched against a closed loop of edges and where the surface to match is not too far away from the surfaces it needs to be matched to. The edges to match to can also be part of multiple surfaces,
If you can share sample files of different scenarios where you are using MatchSrf it would be helpful.
Currently all MatchSrf code is c++ code. There are recent plans to port the UI to C#
Once that is done I’d be happy to investigate ways to make the selection of edges less tedious.
“Refine U”: Ability to rebuild the surface to be matched in the U direction only (preserves the V direction structure with the same control points and degree). Uses the same numerical settings like its sibling in the regular “Match surface” tool, but there must be an additional option to set degree and number of control points;
“Refine V”: Ability to rebuild the surface to be matched in the V direction only (preserves the U direction structure with the same control points and degree). Uses the same numerical settings like its sibling in the regular “Match surface” tool, but there must be an additional option to set degree and number of control points;
Note: If both square tickboxes are selected, the refining is done in both directions. If none is selected, the surface will keep its original structure after the matching to the nearby adjacent edges;
“Detect edges within” (followed by a numerical field). Here the user writes a number in a numerical field to set the maximum distance at which Rhino will try to detect adjacent matching edges. I think that a good compromise is to set the default value to be 100 times greater than the scene tolerance, so if Absolute tolerance is set to 0,01 mm, then running the MatchAround command for the first time in the current session with look for adjacent edges that are within 1 mm away from the selected surface’s edges. At any time the user will be able to set a greater distance for the edge detection.
Priority should be given to nearby edges that are oriented relatively in a similar direction like the surface to be matched. This actually could be made as an additional tickbox called “Prioritize natural edges”, so if there are two extrusions made from exactly the same curve, one vertical and one horizontal, activating this option will tell Rhino to use the more obvious target surface which is the horizontal one for the example in my image above.
“Chain edges” (it’s a square tickbox that expands the pop-up window vertically to give more space for the following 4 options that have filled tickboxes by default upon expanding, but could be turne off individually by the user):
“Chain edge 1”. Ability to chain the matching of edge #1 along the corresponding multiple edges (if any);
“Chain edge 2”. Ability to chain the matching of edge #2 along the corresponding multiple edges (if any);
“Chain edge 3”. Ability to chain the matching of edge #3 along the corresponding multiple edges (if any);
“Chain edge 4”. Ability to chain the matching of edge #4 along the corresponding multiple edges (if any);
“Edge 1” (followed by a button that could be clicked to change between “Position”, “Tangency” or “Curvature”);
“Edge 2” (followed by a button that could be clicked to change between “Position”, “Tangency” or “Curvature”);
“Edge 3” (followed by a button that could be clicked to change between “Position”, “Tangency” or “Curvature”);
“Edge 4” (followed by a button that could be clicked to change between “Position”, “Tangency” or “Curvature”);
“Closest match”. Same function like in the regular “Match surface tool”, i.e. matches to the closest point instead of the entire length of the target edge(s);
“Add edge” button. Ability to click the button to manually pick an edge of the surface to be matched that should be added to the matching process. Obviously, if all 4 edges of the surface are already active, this button is grey/unclickable;
“Remove edge” button. Ability to click on the button to manually remove an active edge from the matching process. Could be handy when the user wants to match only 2 or 3 of the surface edges instead of all 4.
Note: These two could be replaced by simply clicking on the very edge to turn on/off the matching, but this approach is a bit confusing when you consider the other options that also require clicking on the same edges, so it’s better to have two dedicated buttons for that.
“Select target edges”. Ability to select on any of the 4 edges on the surface to be matched and then manually pick target edge(s) of the nearby surface. Important when there are multiple target edges nearby that confuse Rhino which ones must be selected automatically. If the surface edge is already active and matched to nearby edge(s), clicking on that button followed by clocking on that edge will deselect the corresponding target edges and will let the user pick other edge(s).
“Keep original”. A square tickbox that lets you keep the original surface along with its new matched version.
Note: The matched version must have the same object properties like the original surface (object colour, name, material).
Currently, Rhino deletes the object name of offset surfaces and some other types of geometry made with its tools, which is highly unwanted. That was recently discussed in another topic:
Thanks for the writeup.
In case of a multimatch of all edges, I’d expect the surface to be always matched to a closed loop of edges, so it needs to find chains of edges automatically. In the example file you made, edge 1 cannot match to only one of the edges and at the same time match to edge 2 and 4.
Instead of trying to make an overly smart tool how about:
1 Select the surface to want to match.
2 Select the surfaces you want to match to
And then the edge matching is handled by Rhino.
To me that would make most sense because this allows you to match a surface on any number of sides.
This would require a serious fix of MatchSrf though; which as we know will readily launch your control points across time and space in order to come up with some solution to even achieve trivial surface continuity on occasions.
A newer user will simply be one more stage removed from the actual process that is often required to make MatchSrf to work. Allowing them to go all the way to selecting entire groups of surfaces perhaps risks people becoming abstracted away from the weird behaviour of MatchSrf if they don’t understand edge behaviour.
The existing ! _MatchSrf _MultipleMatches already can do that even if I don’t use chain selection and miss one of the edges.
The whole idea behind this smarter MatchAround tool is to make it… smarter than Matchsrf, i.e. capable to doing the job with fewer mouse clicks, but also offering a broader set of options.
In my sample file, the maximum distance between the surface in the middle and the adjacent surface edges of the polysurface is a bit more than 35 mm. If the MatchAround tool has an option to manually set the maximum distance to detect nearby target edges to 40 mm, the tool should work perfectly fine. It just needs development.