SubD.ToBrep() error since last BETA

my definitions code based on 7WIP is breaking since last wip, throwing this error. It always have worked fine. Also, documentation is not requiring any parameter for ToBrep() method. BUG?

Rhino 7 SR0 2020-10-21 (Rhino 7 BETA, 7.0.20295.18003, Git hash:master @ 2d4a7a5745d415e03dcb6752fc9743c66211a738)
License type: Commercial, build 2020-10-21
License details: Cloud Zoo
Expires on: 2020-12-05

Windows 10.0 SR0.0 or greater (Physical RAM: 64Gb)

Non-hybrid graphics.
Primary display and OpenGL: NVIDIA GeForce GTX 760 (NVidia) Memory: 4GB, Driver date: 12-6-2019 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 441.66

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: Height

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 12-6-2019
Driver Version: 26.21.14.4166
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 4 GB

Rhino plugins that do not ship with Rhino
C:\Program Files\Common Files\McNeel\Rhinoceros\7.0\Plug-ins\ClippingBox (4dfff1df-5f09-43ae-a044-77b115244b02)\1.0.0.0\Rhino 6\ClippingBox.rhp “ClippingBox” 1.0.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino WIP\Plug-ins\Commands.rhp “Commands” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\WebBrowser.rhp “WebBrowser”
C:\Program Files\Rhino WIP\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino WIP\Plug-ins\RhinoScript.rhp “RhinoScript”
C:\Program Files\Rhino WIP\Plug-ins\IdleProcessor.rhp “IdleProcessor”
C:\Program Files\Rhino WIP\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino WIP\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino WIP\Plug-ins\Alerter.rhp “Alerter”
C:\Program Files\Rhino WIP\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.0.20295.18003
C:\Program Files\Rhino WIP\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino WIP\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino WIP\Plug-ins\Import_FBX.rhp “Import_FBX”

By the way, how could I go back to the previous beta? Thanks

hi McNeel team, @pascal,

We are wrapping up some work that needs this functionality to work, otherwise we are stuck. Can we please have access to the prior beta for a couple of people in the team working on this, until you get to fix this problem? thx.

Gustavo

Yep, looks busted to me in RhinoCommon reference - thanks I’ll add this to the pile.

Looks like it needs
geo.ToBrep(Rhino.Geometry.SubDToBrepOptions. (you choose, probably DefaultPacked)

(When I have no idea what the thing is asking for, I put in a True, then the next time, the error message will tell me what it expected to get instead.)

-Pascal

1 Like

@pierrec, is there a decent default to use if we chose to add the overload that takes no parameters back into RhinoCommmon?

@stevebaer: geo.ToBrep(Rhino.Geometry.SubDToBrepOptions.Default) is a decent default. It will not pack the NURBS faces, and is the option used by ON_SubD::BrepForm().

@aitorleceta, @gustojunk: There is no need to go through a python component anymore to get the Brep form of a SubD in Grasshopper. Just send your SubD to a Brep data component (or set your type hint as Brep in GHPython).

Thanks @pascal, @pierrec, all.

We are so old skill we don’t even know all these new tricks!

G

Good to know, but the code was wrote as a sample of the problematic rhinocommon behavior. We are using the conversion method in larger app.
Thanks for providing the solution @pascal, everyone!

P.s; I would found more “appropiate” a “hardcoded default”, just for sake of consistency with other (the rest?) ToBrep() methods all over Rhino.Geometry namespace