Merge Edge Wish/Bug

tldr/w - If you are merging an untrimmed edge on a surface, I don’t think you should need to run RebuildEdges in order to pop out the “natural” definition of that edge from DupEdge.


Hi Sky - Untrim is the way to get the natural edge of a surface, if it is untrimmed. RebuildEdges is close in 3d but not necessarily the same as untrimming/retrimming with the original trimmer, on a trimmed edge.


I see that works in this case. Let’s say there’s an untrimmed edge that’s been split twice, so it’s now three segments, but you want to merge two of those into one. Might still be nice to have MergeEdge work in the way I describe so that you end up with two natural curves using DupEdge. Just an idea, one less step, as in this instance using Untrim would require you go back and split again.

Hi Sky - I guess the problem will be that the original information about the trim curve is gone once the edge has been split - the brep only knows about the current edges - so merging is all that is available. In special cases, like circles and lines, it may well be possible to recreate a simpler curve but I don’t think in the general case that is still there.


To be clear, I’d only consider this a “bug” on untrimmed edges. Totally, fully understand what you’re saying in terms of trimmed edges, but in this case, there is no trim curve, there’s just the natural edge that’s been “split”. It sorta seems like you’re saying that RebuildEdges isn’t really designed to fix this issue, but I can assure you that whatever it’s doing, it’s doing the right thing for this issue - really just more of an annoyance that I have to run it so often.

More context/why I think this matters:

ETA - and the problem just stacks up every time you split/merge and then try to loft - every time the resultant surface just gets more dense.

ETA2 - Stranger still (but for the better!) MatchSrf sees the edge properly - you can SplitEdge and MergeEdge all day long, and MatchSrf will still see that edge as degree 3 with 4 points. But if you DupEdge and ExtrudeCrv you get a big mess.

ETA3 (Last one, pinky swear) - in the example loft above, the surface created is non uniform across the edge in question, which just makes it even more difficult to deal with.


Try _ReplaceEdge with _Mode=ExtendSideEdges.

I should add, just because there seems to be a bit of confusion from the replies - this is a bug that pertains only to untrimmed surface edges and SplitEdge/MergeEdge - this is not about trimmed surfaces at all. When you use SplitEdge on an untrimmed surface edge, and then you use MergeEdge to bring it back to one single edge, there is a problem with how Rhino is seeing that (untrimmed) surface edge definition - for many commands that (untrimmed) edge is now needlessly complex.

1 Like