Understanding B-reps in Grasshopper

Today, we are continuing down our journey through the base geometry objects in Grasshopper/Rhino by taking a look at B-reps. The concept of B-reps is fairly straight forward and I think it is an extension of what we already know about surfaces in Rhino/Grasshopper.

What are B-reps

B-reps are an acronym that stands for Boundary Representation object and is used a lot in other CAD programs to represent geometry including Rhino.

B-reps can either be a single surface or a poly-surface (multiple surfaces joined together). For Rhino to create a valid poly-surface, the surfaces must share at least one edge.

Furthermore, Rhino has further split B-reps into two categories, open and closed B-reps.

Open vs Closed B-reps

Open B-reps have at least one exposed edge while closed B-reps have no exposed edges. Meaning a single surface B-rep is an open B-rep while a box would be a closed B-rep.

But even one exposed edge in a poly-surface B-rep would classify the B-rep as open instead of closed.

As small as these distinctions may seem, they are actually very important because depending on the type of B-rep you have, the available geometrical operations you have will differ.

B-reps as a Data type

B-reps also take the form of their own data type in Rhino/Grasshopper under the brep class. This data type although used in both Rhino and Grasshopper is only explicitly mentioned in Grasshopper.

For example, selecting a box in Rhino will show that you have selected 1 closed extrusion instead of 1 closed Brep.

Whereas, in Grasshopper, you can only reference the box through the brep data container.

Using B-reps

B-reps are a very useful addition to the geometrical arsenal that we have. I like to treat them as groups of surfaces with some smart logic attached to them.

I think there are three very beneficial ways of using B-reps that help improve our modeling.

Poly surface Functions

As we are given the ability to treat multiple surfaces as one entity, Rhino/Grasshopper has also given us the ability to perform geometrical intersections without having to manage multiple surfaces.

For example, if I wanted to split this box here.

I don’t have to manage the 4 surfaces individually, I can just use Split command and Rhino would know how to handle the B-rep split.

Which makes things much easier as I don’t have to manually handle each surface of the box. Projecting curves onto multiple surfaces is also an operation that benefits from using B-reps.

Solid Operations

Different from other conventional CAD programs like Solidworks, Rhino is primarily a surface modeler which gives you a lot of flexibility when modeling but it does lack some of the features that you can perform easily in solid manipulations.

For this reason, Rhino tries to make it up by treating closed b-reps as solids. And then applying some logic and smarts that give us the ability to perform solid operations on closed b-reps.

Operations like Solid Unioning, Differencing, and Intersections are all made possible with closed b-reps.

Rhino even offers the ability to fillet edges of closed b-reps, like so.

However, as powerful as these functions are, they are sometimes not as good as pure solid operations. Even though Rhino does a good job most of the time, it is harder to get these functions to work on more complicated b-reps.

Final thoughts

In total, B-reps are a common representation of geometry that exists in most CAD programs, and understanding them again just gives us further control over our models and unlocks more modelling options and techniques.

This article is part of a 6-part series on Grasshopper geometry types. Where the aim is to use Grasshopper more effectively by understanding how Grasshopper processes geometry data.

Part 5 - Understanding B-reps in Grasshopper

P.S. I have also made a Youtube video that covers this topic too.

ing