How to use Curve Boolean in Grasshopper

Curve Boolean in Grasshopper
Quick links

This blog post is all about learning how to use the Curve Boolean feature in Grasshopper to enhance your designs. We’ll explore the benefits of using Curve Boolean, how it works in Grasshopper, and provide a step-by-step tutorial to help you get started. Whether you’re a seasoned pro or a beginner, you’ll find plenty of helpful information here. Let’s get started!

Where to find Curve Boolean in Grasshopper

Curve Boolean is one of those powerful commands in Rhino, that can save you a lots of time. It’s a command that only a fraction of Rhino users know, but it’s oh-so useful. And it’s just as powerful in Grasshopper.

As with a handful of other commands, the Curve Boolean command goes by different names in Rhino and Grasshopper.

In Grasshopper, the Curve Boolean command is split into three separate components:

  • Region Union
  • Region Intersection
  • Region Difference.

Unlike in Rhino, where you can define the resulting curve outline output by clicking inside the regions to keep, in Grasshopper you need to decide which one of these three operations you want to run.

CurveBoolean and Region components in Grasshopper
Region Union, Region Difference and Region Intersection

The components work much like the Boolean Operations in Rhino: you can join, intersect and subtract two or more curves from each other.

But there are some conditions that need to be met for the components to work:

  • The curves that will be used for the Curve Boolean operation must be planar (meaning flat)
  • All curves involved must be closed.
  • The curves must be co-planar, meaning they are located on the same plane.

Let’s see how the components work one by one:

Region Union

Add the ‘Region Union’ component to the Grasshopper canvas by double-clicking onto an empty spot on the canvas and typing ‘Region Union‘. Click on the first result to add it to the canvas.

Adding the Region Union component

As this component will try to merge all the curves in its input, there is only one single curve input (C).

All Region components have a ‘Plane’ (P) input. Use it to define the plane of the Curve Boolean operation. If you don’t provide an input, Grasshopper will try to guess the base plane for the operation, and in most cases, it gets it right. To avoid avoid surprises and possible bugs in your script, define the plane for the Region commands. In the example below, I’m using the world XY plane (search ‘XY Plane’ in the component search bar).

Make sure that all the curves are closed, planar, and on the same plane before running the component.

Example script of the Curve Boolean/ Region Union component

Region Difference

Add the ‘Region Difference‘ component to the Grasshopper canvas by double-clicking onto an empty spot on the canvas and typing ‘Region Difference’.

Adding the Region Difference component

The Region Difference component has two inputs: the first input is the set of curves (A) to subtract from, and the second the set of curves (B) that will be subtracted from the first set. The third input is once again the base plane for the operation.

Once again make sure that all the curves are closed, planar and on the same plane before running the component.

Example script of the Region Difference component

Region Intersection

Add the ‘Region Intersection‘ component to the Grasshopper canvas by double-clicking onto an empty spot on the canvas and typing ‘Region Intersection’.

Adding the Region Intersection component

The Region Intersection component also has two inputs: the first input is the set of curves (A) to subtract from, and the second all the curves (B) that will be subtracted from the first set.

Like the other Region components, the third input is the base plane for the operation.

Once again make sure that all the curves are closed, planar and on the same plane before running the component.

Example script of the Region Intersection component

Possible problems you may run into

Co-Planarity

In some cases the curves we are trying to run Curve Boolean or Region operations on, are not on the same plane. To solve that we add a plane in the third input P. The curves will automatically be projected onto that plane, and the Curve Boolean operation will be run there.

If we don’t provide a base plane for the operation, Grasshopper doesn’t know which plane to use and the command fails.

In the example below some curves are on a different plane: the Region Union command fails and doesn’t return any output, as shown by the orange wire.

Curve Boolean / Region Union not working

In the example below we made sure that all curves are in fact on the same plane. Even without providing a Plane input (P), we get the result we want.

RegionUnion with co-planar curves

In the example below we have curves on different planes, but we specify a base plane. By using the XY Plane for the P input, all curves are projected onto that plane and processed there.

RegionUnion with baseplane specified

Open Curves

If there are open curves in the set of curves you are trying to run a Region command on, the component will fail.

Regions with open curves

One way to solve that is to check for open curves before feeding the curves into the Region component.

Sometimes it’s not easy to tell whether curves are open or closed. The opening could be very small, or there are just too many curves to check visually.

In that case we can use the ‘Closed’ component to check whether a curve is closed or not. This component will return a True or False value. By using a Cull Pattern component we can then remove all the open curves from the set. This way the Region command will run smoothly. By using this process we can also find the open curves and perhaps even develop our script to avoid open curves from being generated altogether.

In the example below we’ve added the ‘Closed’ as well as a ‘Cull Pattern’ component and grouped them to keep the script organized.

Removing open curves before running the Region Union command

Self-intersecting curves

The Region commands are usually used in conjunction with the Boundary Surface component, which turns any closed, planar curve into a surface. If the result of a Region command results in one or more self -intersection curves, as shown below, the Boundary Surface component will not work as intended: the interior section of the self-intersecting curve will be skipped.

Self-intersecting Curves and Surface Creation

That’s because both Rhino and Grasshopper have trouble dealing with self-intersecting curves.

To avoid this problem, we need to tweak the inputs of the Region components.

The best way to deal with this issue is to model the design closer to real life. In construction and fabrication, there is no such thing as a self-intersection or shapes that touch in a singular point. Objects need to either have a clear overlap, or they don’t touch at all.

A simple solution would be to create an overlap between the curves before we run any region command. In the example below, offsetting the curves avoids the singular touchpoint, and the component runs smoothly.

Self-intersecting Curves and Surface Creation with Offset

Common architectural use cases for Region components

Detailing

Region commands are very useful for creating computationally ‘cheap’ Boolean Differences and Unions. For example, creating a perforated planar surface with Region commands is much quicker than running a Boolean Difference of solids. And we can achieve the same result. Keep in mind that although it is faster than their 3D counterparts, Region components are still quite resource-hungry, especially if you are trying to process more than a hundred curves at once.

To speed up the component, it can help to de-activate the ‘Multi-threaded’ option – on my machine it runs 10x faster!

Geometry Cleanup

Sometimes in our script we may end up using many more geometries than needed, due to specific algorithms that we write. We still want to have a clean model at the end of our script, that outputs a simple, light-weight and clean geometry. The Region Union component can help clean up adjoining or overlapping curves and surfaces, resulting in continuous, clean surfaces.

Below we have 21 adjoining curves, if we turn them into surfaces, we get 21 surfaces.

Region Union for simplifying a script

By applying the Region Union command, we can join all the curves, the Boundary Surface component then only has to create one single surface! It’s a great way to keep your scripts lightweight.

Curve Boolean / Region Union for simplifying a script 2

The bottom line

In conclusion, Curve Boolean in Grasshopper is a must-have command for any architectural designer looking to up their game. With its ease of use and precision, you’ll be able to create complex designs with confidence. We hope that this blog post has provided you with a solid foundation for using curve boolean in Grasshopper.

If you’re looking to fast-track your learning curve, we highly recommend our comprehensive Grasshopper course. Our course is designed to help you master the software in no time, with step-by-step tutorials, expert tips, and hands-on projects. Whether you’re a beginner or an experienced designer, our course has everything you need to take your skills to the next level.

So, if you’re ready to take your architectural designs to the next level, sign up for our Grasshopper course today! We can’t wait to help you achieve your design goals.

Like this article?
Share on LinkedIn
Picture of Thomas Tait
Thomas Tait
Architect at Snøhetta and Head Instructor @ Hopific (or, in plain English, I help designers use Grasshopper to supercharge their designs.
Ready to Dive into Grasshopper? Grab Your Free Ebook!

Accelerate Your Learning and Get Up and Running Quickly.