Brep, short for Boundary Representation, is a method used by 3D modeling and CAD applications to represent 3D objects by defining the limits of their volume.
Imagine a 3D object as a solid entity. A Brep focuses on the boundaries that encase this solid. Unlike other representations that might use polygons or vertices, a Brep is defined by the mathematical relationships between its surfaces. This mathematical precision allows for a more accurate representation of complex shapes and contours.
In the context of Rhino and Grasshopper, you can think of a Brep as the same as a ‘Polysurface‘.
The Building Blocks of a Brep
A Brep is like a patchwork; it’s made up of several pieces that come together to form a whole. These pieces are the topological components of the Brep, which include faces, edges, and vertices. A face is a bounded portion of a surface, an edge is a bounded piece of a curve, and a vertex lies at a point. These elements are connected in a way that they define the boundary of a 3D object.

Just like Polysurfaces, Breps can be categorized into two types: open and closed.
An open Brep has at least one exposed edge, while a closed Brep is sealed off completely. Think of an open box versus a closed one.

The type of Brep affects the kind of geometrical operations you can perform in Rhino as well as in Grasshopper.
A fully enclosed 3D object or Brep is also called a “Solid” in Grasshopper. Boolean operations – the subtraction, union or intersection of closed 3D objects in Rhino – Grasshopper refers to them as “Solid” operations.

Why Use Breps?
Breps’ mathematical precision is their superpower. This precision allows designers and engineers to create “perfect” representations of their designs. Especially in manufacturing applications, or 3D-printing, where accuracy is paramount, Breps are invaluable.
Brep vs Mesh
Now, you might be wondering how Brep differs from meshes. While meshes are made up of polygons, Brep uses mathematical representations to define surfaces.
Imagine zooming into a bent surface. With a mesh, the surface starts to look blocky, but with a Brep, the surface remains smooth no matter how much you zoom in. This makes Breps ideal for representing complex 3D objects with curved surfaces.
Limitations of Breps
However, every superhero has its kryptonite. For Breps, it’s the heavy file formats and the processing power required for visualization. Brep files store a lot of metadata, which can take up significant disk space. Additionally, rendering or animating Brep objects can be resource-intensive.
Moreover, Brep might not be the best choice for organic or natural objects. The precise mathematical formulas can make it challenging to recreate more fluid shapes.
Essential Brep Components in Grasshopper
Brep is not just a theoretical concept; it’s at the core of everything we model in Rhino and Grasshopper. In Grasshopper, you can perform a range of geometrical operations using Breps. Some components result in Breps (for example extruding a surface) others operate on the Breps themselves.
The Brep Data Type in Grasshopper
In Grasshopper, Breps have their own data type. This means that certain objects, like boxes, can only be referenced through the Brep data container. The Brep Container component is located in the ‘Params‘ component tab, under ‘Geometry‘.

Here are five essential Brep components in Grasshopper:
Deconstruct Brep
Everything that is assembled can be disassembled. The Deconstruct Brep component acts like a 3D puzzle solver, taking apart any Brep input into its fundamental building blocks: Faces, Edges, and Vertices. Put simply, it breaks down the complex structure into Surfaces, Curves, and Points, giving you the elemental pieces to work with.
Application Example:
Use this component for selecting a particular sub-element of a Brep, for example one of its surfaces. To select the top surface of a cube, for instance, use the Deconstruct Brep component to get a list output of all the Surfaces the Brep is composed of, and then select the one you want with the ListItem component.

Point in Brep
The Point in Brep (BrepInc) component is part of a group of analysis components. The premise is simple: the component helps us to find out if a point is in a Brep or not. When provided with a closed Brep and a list of points, it will output a list of Boolean Values. If a point in contained in the list, the value will be True, and otherwise False.
The Point in Brep component can thus be used to select objects that are contained in a given Brep volume. In the example below I used the ‘Cull Pattern’ component to process the list of points with the True/False values.

Solid Difference
This one may be tricky to find at first, because coming from Rhino, one would look for a ‘Boolean Difference’ to subtract a closed 3D object from another. Instead, in Grasshopper the components are called Solid Difference, Intersection, and Union respectively.

Brep Closest Point
The Brep Closest Point component is part of the family of closest point components. These components find the closest point on a geometry as calculated from a list of points, in this case from a Brep.
Provided a Brep and a list of Points, the Brep Closest Point component will output the closest points on the brep, the Normal to the Brep at those points, and the Distance.

Brep | Brep Intersection
The intersection components in Grasshopper have their own component tab and contain intersection components for all different combinations of geometry types. Shown below is the Brep | Brep Intersection component. As the name suggests, given two Brep inputs A and B, the component will output the Intersection Curve (C), as well as eventual Intersection Points (P).

These are just a handful of the Brep commands available in Grasshopper. Double-click on the canvas and type ‘Brep’ into the search bar to see what other Brep components Grasshopper has in store!
Keep in mind that commands in Rhino and Grasshopper sometimes use different terminology to refer to the same commands. Some components might go by different names even though they perform the same function.
Happy designing!

