Rhino.Geometry.Brep.Unroller Explodes Brep Unexpectedly

@dale @BrianJ

I use the following to unroll a brep inside a GH, Python 3 component. Please find an example GH file below. Despite br.ExplodeOutput = False the brep is exploded. When using the Rhino command UnrollSrf Explode=No the brep unrolls as expected in one piece.

Can I use the Unroller differently to make it work? What is _UnrollSrf doing to make it work?

UnrollQuestion.gh (103.0 KB)

def unroll_brep(br: rhg.Brep, tol: float) -> list[rhg.GeometryBase]:
    br.Repair(tol)
    br.Standardize()
    br.Compact()
    unroller = rhg.Unroller(br)
    unroller.AbsoluteTolerance = tol
    unroller.ExplodeOutput = False
    unroller.ExplodeSpacing = False
    # TODO: Unroll results in exploded faces. When unrolled with Rhino UnrollSrf, it results in a single brep.
    res = unroller.PerformUnroll()
    print('Number of faces:', len(res[0]))
    return res[0]

I am aware of the fact that the faces of this brep are slightly double curved. I have other test geometry that does not explode despite stronger gaussian curvature. The issue exists only with this type of brep of which I have 700+ pieces.

I could solve the problem at hand with a subsequent join, but this causes other test geometry to fail. Since the component I am working on is a general purpose solution for a client, I would be interested in understanding the problem and why it is happening with this type of brep.

The brep was made by converting a mesh.

My Rhino is current as of today
Rhino 8 SR19 2025-4-30 (Rhino 8, 8.19.25120.01001, Git hash:master @ d5acc4497886d70951bcf732c57f14e7f860b15a) License type: Educational, build 2025-04-30 License details: Cloud Zoo Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 128GB) .NET 8.0.15

Many thanks in advance. Silvan

Hi @silvano,

Thanks for reporting - I’ve logged the issue.

– Dale

1 Like

RH-87303 is fixed in Rhino 8 Service Release 20 Release Candidate

1 Like

@dale @brian
I assume the fix introduced a new bug. Since SR20 we get a flipped face that worked fine in SR19. Please see image and example GH component below. The commented lines have no effect oon the result. Thanks for looking into it.

unroll_bug_2.gh (12.9 KB)

The results look similar to what the UnrollSrf command produces. Am I missing something?

– Dale

@dale Thanks for your feedback. Indeed the result is the same as with UnrollSrf. I had mixed up expected results from our original code and the test I sent you. Please excuse the confusion.

1 Like