Brep | Plane (Section) and Contour (Ex) problem

I want to produce contours from a Brep but I cannot get Grasshopper to output the final contour - no matter how many planes I try, the final one is missing. Attached file shows the Brep Plane intersection issue, but Contour (Ex) does the same thing. (256.2 KB)

It looks like the top may not be exactly planar.

If you reduce the unit tolerance to 0.01, it seems to work.

Hi @Adam_M,

Thanks for your thoughts which have steered me toward investigating Rhino intersections some more.

The top is indeed not planar but in the general case a brep being processed could have any shape top, so the script is going to have to handle it. Changing the document tolerance to 0.01 does allow it to find an intersection, but I’d rather not assume I can do that for all models.

Rhino is showing some discrepancies between different types of intersection:

  1. It generates a bounding box that, by definition, intersects the top of the brep.

  2. Using a surface generated from the top of the bounding box, Rhino does not find an intersection with the brep.

  3. Using the same surface, with a curve created from the top edge of the brep, Rhino does find a short intersection. (For the brep in the example, I would expect this to appear as the final contour).

  4. Using a plane at the top of the brep, Grasshopper does not find an intersection with the brep.

  5. Using the same plane, and the top edge of the brep, Grasshopper finds a Curve / Plane intersection at two points. The points are within the length of the intersection found at 3, but match neither its ends nor mid point.

@pascal, may I draw your attention to these discrepancies?


A bounding box will touch that top edge at one or more points but that doesn’t mean the top edge is planar. Cap Holes closes the bottom but not the top.

Better questions might be:

  1. Why is the top edge not planar? That depends on how it was created.

  2. What to do about the general case where top edges are not planar? Clearly that means using the top edge instead of a contour intersection.

Thanks Joseph,

In a different context these may indeed be better questions, but for now I want to focus on why Grasshopper is not producing the final intersection (even if it is only a point) and on why different parts of the Rhino ecosystem produce different answers for the intersection.

And now also (@pascal): why in this derived model (the plane’s z position has been reduced from 20 to 19.9997) do I get intersections at tolerances of 0.01 and 0.0001 but not at the intermediate 0.001?
RandomShape.3dm (334.3 KB)


This turned out a little more complicated than one would hope, but it combines the top and bottom edges with closed section curves, culling duplicates (within 0.001 Z). (245.6 KB)

Hi Jeremy - I do not know - the actual deviation is ~.004… pretty close to that non participating tolerance. Duuno, I’ll put it on a pile…