Brep.Repair()


(Willem Derks) #1

Hi,

The Brep.Repair() Method

Attempts to "right" a brep that is not faulty or incomplete

http://developer.rhino3d.com/wip/api/RhinoCommonWin/html/M_Rhino_Geometry_Brep_Repair.htm

Can someone elaborate if and when this Method will be usefull?
I read the not in the description as a typo that should be omitted.

My context: I’m handling imported geometry and try to setup a series of methods to clean up the geometry as much as possible. eg Brep.Standardize(), Brep.Compact()

Thanks
-Willem


(Dale Fugier) #2

Yes, correct.

The idea of the function is to fix ‘bad’ Breps. But it’s possible for the function to make changes to perfectly good Breps too.

Let me spend some time documenting these - I’m sure that would be more helpful.

https://mcneel.myjetbrains.com/youtrack/issue/RH-37441

– Dale


(Dale Fugier) #3

@Willem, I’ve added some comments to Brep.Repair() for the next WIP.

In a nutshell, the function fills missing information in Brep definitions. The function is useful when reading Brep information from other file formats that do not provide as complete of a definition as required by Rhino.

For example, some formats provide edge curves and no trims. In this case, Brep.Repair() will fill in the missing information, pulling back the 3D curves to the appropriate surface(s), and a whole bunch of other good stuff.

Hope this helps.

– Dale


(Willem Derks) #4

Hi Dale,

Thanks for the swift update. It’s exactly the type of functionality I was hoping for as I’m dealing with imported geometry.

Thanks
-Willem