Rhino WIP Feature: Clipping Planes for GH1

Clipping Planes Come to Grasshopper 1

We’re excited to introduce Clipping Plane support in Grasshopper 1, building on Rhino 8’s powerful SectionTools.

With these new components, Grasshopper users can now:

  • Create and edit section/clipping planes directly from the Grasshopper canvas.

  • Style and manage section outputs with customizable section styles.

  • Automate outputs using Grasshopper equivalents of Rhino commands like ExtractClippingDrawings, ExtractClippingSections, ExtractClippingSlices, and SaveClippingSectionView.

This integration makes it possible to drive sections parametrically, linking them directly to geometry in your definition. Whether you’re streamlining documentation, enhancing visualizations, or exploring design alternatives, sectioning is now a dynamic part of your Grasshopper workflow.

Grasshopper is steadily expanding the number of Rhino data types it can work with — and sections are a major addition for both design exploration and professional documentation.


How does it work?

Let’s dive in for a closer look at this new feature set. You’ll find all the new clipping plane components under the Rhino tab in the Drafting subcategory.

The first step is to create a clipping plane from scratch. To do this, add a Model Clipping Plane component to the canvas.

This component has several input parameters:

  • Clipping Plane – Accepts an existing clipping plane as input and works like a pass-through component. This lets you inspect attributes of an existing clipping plane. Since we’re creating a new one, we’ll leave this input empty.
  • Plane – Sets the position and orientation of the clipping plane surface.
  • Size – Sets the clipping plane’s width.
  • Depth – Sets the clipping plane’s depth.
  • Depth Enabled – Toggles whether the depth value is used to clip objects.
  • Label – Defines how the clipping plane is labeled. Options include:
    • (0) None
    • (1) Annotation Dot
    • (2) Text
  • Style – Sets the annotation style used to determine how the clipping plane is drawn with respect to arrows and fonts.
  • Viewports – Sets the viewports where the clipping plane will be active.

To assign a name to your clipping plane—just like with other annotation objects—use the Model Object component. Keep in mind that you can simplify the component display by right-clicking on it and choosing Hide Unused Parameters, which hides any inputs or outputs you don’t need.

The setup shown above creates a clipping plane named “Sec A” positioned on the XY plane at {0.0, 0.0, 0.0}. It has a width of 10.0 units, and a depth of 1.0 unit (which is disabled). The label style has been set to “Text” and the annotation style has been left empty.

The Query Viewports component controls which viewports the clipping plane is applied to. If the name filter is left empty, the query component returns all available model viewports.

To assign specific viewports, first disconnect the Query Viewports component and then right-click the Viewports input and select the desired viewport(s) from the context menu.

With the clipping plane defined above, you should see the following representation in the viewport. You can use the Content Cache component to bake this clipping plane into your Rhino document.

By default, baking a clipping plane will automatically set it up to clip all objects in your model.

However, there may be times when you only want the clipping plane to affect certain objects and/or layers. To control this setting, you must use the Objects Clipped component.

The Objects Clipped component has the following inputs:

  • Clipping Plane – Accepts a clipping plane to modify.
  • Clip Filter – Defines how the objects should be handled by the clipping plane. Options include:
    • (0) All - All model objects will be clipped.
    • (1) Include Selected - Clipping applies only to the objects explicitly added through the Objects and Layers inputs.
    • (2) Exclude Selected - Clipping will exclude any objects explicitly added through the Objects and Layers inputs.
  • Objects – Objects to be included or excluded during clipping.
  • Layers – Objects on these layers to be included or excluded during clipping.

If you want only certain objects to be clipped, pass the clipping plane you created above into the Clipping Plane input, then use the filter to choose which objects should be clipped and which should not.

Note: The Objects and Layers inputs must reference items that exist in the Rhino document (they must have an ID). If you try to use geometry or layers that are not part of the document—such as standard Grasshopper geometry—you’ll see a warning. To use them with the Objects Clipped component, you must first bake the geometry into the Rhino document.


What are Clipped Drawings?

One of the notable new additions to Grasshopper is the Extract Clipped Drawing component. It mirrors the functionality of Rhino’s CreateClippingDrawings command.

This component generates 2D geometry from clipping planes. The resulting drawings can be created directly on the clipping plane or repositioned and reoriented elsewhere in the model.

The Extract Clipped Drawing component has the following inputs:

  • Clipping Plane – Accepts a clipping plane to create the drawing elements.
  • Projection – Defines the view projection to be used during the Make2D process of creating the drawing elements. Options include:
    • (0) Parallel
    • (1) Parallel Reflected
    • (2) Perspective
  • Lens Length – Sets the lens length of the view projection. This only applies to projections set to Perspective. The default value is 50.0 mm.
  • Objects – The objects to be included in the clipped drawing. Note: these objects do not have to be baked into the Rhino document prior to use. You can pass standard Grasshopper geometry into this input.
  • Attributes – Defines how the attributes for the 2D geometry are calculated. Options include:
    • (0) By Output Layers - The generated 2D geometry is placed on a new set of layers that are created automatically. These layers are grouped under a root layer named after the clipping plane. Each layer starts with default properties (such as color, linetype, and material), which you can modify later using Grasshopper’s object attribute components or directly in Rhino after baking the geometry.
    • (1) By Source Layers - The generated 2D geometry keeps the attributes of the original objects it came from. This includes properties like layer, display color, linetype, and material. As a result, the output geometry is placed on the same layers as the source objects.
    • (2) By Input Objects - The generated 2D geometry uses the same automatically created layer structure as By Output Layers, but its object attributes are derived from the source objects. Any attributes on the source objects that were set By Layer or By Parent are first resolved to their final values and then directly assigned to the 2D geometry.
  • Reference Point – A reference point to be used when transforming the 2D drawing geometry from the clipping plane to the target plane.
  • Placement – A target plane on which the 2D drawing geometry will be drawn. If left empty, the 2D drawing geometry will be shown “in-place” along the clipping plane.
  • Update – Creating clipped drawing geometry can be time-consuming. For this reason, the component does not generate new geometry automatically. Instead, you must press the Update button to run the calculation. If you prefer automatic updates, zoom in on the component and click the plus (+) button at the bottom. This replaces the manual button with an Update input. When this input is set to True, the geometry will automatically recalculate whenever any of the inputs change.


Example Files:

  1. A basic example showing how to setup a clipping plane and assign a section style to an obejct:
  2. A simple example showing how to create a 2D drawing using a clipping plane:
15 Likes

I have an old Rhino 8 build for comparison at work, and the latest Rhino 9 WIP at home. I’m happy to see the tool collection grow, thanks a lot!

I noticed one bug during testing. It seems that if we cut an object that doesn’t have a Section Style assigned, we get an error in the Extract Clipping Drawing component.

The second Object, which is identical except for its own Section Style, works fine.

Please move this post to the separate thread if bugs should be posted separately in orderd to keep this thread clean and just for the discussion about this feature.

Thanks for reporting this @Czaja. I have created a YT (RH-92032) to track this.

Is it expected to produce drawings on par with ClippingDrawings yet?

RHINO SECTION TEST.3dm (394.0 KB)
rhino section test.gh (9.1 KB)

  1. Some lines are missing, including a whole cylinder object.
  2. Some lines that should be Visible are Hidden.

Display picture in 100% zoom, because faint lines may disappear

  1. Slight differences in camera projections (both methods are using Perspective). In Rhino command, there is no info about the Lens length - I assume it uses 50 mm as a default, same as in the GH component. Target point set to the middle of the Clipping Plane. (Nice that we have a GUI window for the EditClippingDrawings)

You’ve actually identified several of the same issues I struggled with while developing this feature. First, it’s worth noting that both the Rhino command and the Grasshopper component are still under development, so there’s room to improve how this works.

One challenge is that some parts of the Rhino Clipping Drawings command are hard to reproduce in Grasshopper. This is mostly because clipping planes were designed long ago to rely heavily on the Rhino document. Grasshopper, on the other hand, tries to avoid depending on the Rhino document whenever possible, which makes certain behaviors tricky to replicate.

This does get a bit technical, so feel free to ask follow-up questions. One key issue you noticed is that the view projections don’t always match. Kike and I intentionally chose not to exactly copy how the Clipping Drawings command calculates its view projection, which is likely why you’re seeing different results.

The Rhino Clipping Drawings command uses the Perspective viewport (assuming a perspective projection is specified in the command arguments) as its starting point. That means it looks for a viewport named “Perspective” in the Rhino document, and if it doesn’t exist, it creates one. In other words, the command depends directly on the state of the Rhino document.

We decided not to do this in Grasshopper because it would mean the same Grasshopper definition could produce different results depending on which Rhino document is open. In general, we want a Grasshopper definition to produce the same output every time, unless you explicitly reference different geometry.

Another complication is that the Clipping Drawings command doesn’t clearly document that it uses the Perspective viewport as its base. For example, if you want to change the lens length of a clipping drawing, you actually have to modify the lens length in the Perspective viewport’s properties. This dependency is fairly hidden and, as far as I know, not well documented.

After locating the Perspective viewport, the Clipping Drawing command reorients the view so it aligns with the clipping plane. To do this, it first gathers all the geometry being clipped (or all geometry, if “apply to all” is enabled) and calculates their centroid.

That centroid is then projected back onto the clipping plane, using the opposite direction of the plane’s normal. The resulting point becomes the new camera position for the perspective view, and the clipping plane’s normal becomes the camera’s viewing direction.

In Grasshopper, we felt a simpler and more intuitive approach made more sense. Instead of finding a centroid and projecting it back to the plane, we use the center of the clipping plane directly as the camera position, with the plane’s normal as the camera direction. The assumption is that when you create a drawing from a clipping plane, the center of that plane naturally acts as the “eye” of the camera.

Because we’re not relying on a Rhino document or an existing Perspective viewport, we still needed one additional piece of information to fully define the projection: the lens length. With the clipping plane center, the plane normal, the extents of the clipping plane, and the lens length, we have everything needed to construct a proper view projection.

So while the Rhino command and the Grasshopper component are similar, there are a few key differences that can cause their output geometry to not match exactly. This was something we discussed at length, and as I mentioned earlier, there’s still room to adjust the approach if one direction proves to make more sense. I know Rajaa is still actively working on the Clipping Drawings command so I expect that the GH component will likely change some to try to get consistent results.

I hope this background helps explain why you might be seeing different results. That said, I’d be happy to look at your test files to see if there are additional parameters we can adjust to bring the results closer together.

That said, I think I see why some of the drawing output is missing. When you created the clipping plane, it doesn’t fully extend through the right-most wall. You can confirm this by plugging your Model Clipping Plane into the Model View component, which shows how the clipping plane is projected into the view. As shown in the image below, the view used for the Make2D step in the Clipping Planes component simply doesn’t “see” the column or the right-most wall.

To fix this, select the clipping plane and drag its handle so the plane extends beyond the wall. You may also want to move the entire clipping plane along the Y-axis so its center better aligns with the center of the model.

This highlights an important difference between the “find centroid and project back to the clipping plane” and the “use the center of the clipping plane” approaches. In the Rhino command, the centroid of all geometry is used to reposition the view so that most, if not all, of the model fits within the projection. While it’s still possible that some geometry might still get clipped if the lens length is too small, the camera is generally centered on the overall model.

In contrast, the Grasshopper component sets up the view strictly from the clipping plane’s center, normal, extents, and the lens length. In this case, because the clipping plane didn’t cover the entire model, parts of the geometry fell outside the view and weren’t included in the output.

Let me know if that explanation makes sense, or if you’d like me to walk through it step by step.

2 Likes

Thanks a lot for the comprehensive answer, it cleared up a lot of doubts. I didn’t expect the length of the clipping plane to matter, because in Rhino, the clipping plane extends indefinitely. A horizontal line was recently added to the clipping plane, making it more visible. Interestingly, I can also scale the Clipping Plane in the Z axis, which is reflected after connecting Clipping Plane component to the Model View, but it doesn’t affect the resulting 2D drawing. I wonder if limiting the top-bottom range would also be desirable, probably.

I’m trying to keep a table in my head of the features available in ClippingDrawings, Make2D Rhino, Make2D Grasshopper, “graphical” Clipping Planes (i.e., the normal ones, in Rhino’s Model and Detail Views), and the new Extract Clipping Drawings… and it’s not easy to remember what’s available where. I’m happy with the addition of Extract Clipping Drawings, and I think it might be the most transparent way for me to work, although I have some concerns about documenting the resulting 2D drawings and associating Annotations after generating a new drawing (e.g., adding Leaders with Attribute User Text, but not through Grasshopper, only manually) – but that’s a completely different topic.

I’ll probably come back with some corner cases… object exclusions, 2 or more clipping planes at once, etc. come to my mind right away.

P.S.
Nice, that we can extract the boolean input for the update. Make2D and Query Model Objects do not have that, which means using them inside Grasshopper Player is limited/impossible

Hi Jakub -

I’ve put that on the list as RH-92145 Grasshopper: Extract Drawing: Hidden Lines Should be Visible
-wim

I’ve brought this up as well. To me, it seems like a nice feature to be able to tell the clipping plane on which sides of the plane that you want to clip. For example, there’s a check box which you can enable which lets you add an additional clipping plane at some depth distance (basically along the normal of the plane). It seems like it could also be useful to add checkboxes to enable clipping on the sides of the clipping plane as well… essentially creating a clipping box. But, that would require a good deal of plumbing into the rhino core to get working. Perhaps that idea will get revisited at a later date.

It is, and has been, on the list - RH-223 3D view clipping
→ (originally created 1998-07-31)
-wim

2 Likes

:distorted_face:

2 Likes