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