Hi everyone,

I have been running into some issues with using Brep.Trim(Plane, tolerance).

I attach an example file in grasshopper - it shows a large radius fillet surface which got extended a bit in previous step of the definition and tries to trim it with a plane, the routine Brep.Trim() does not yield any results whereas a standard grasshopper Brep Section component shows that there should be an intersection.

I tried this in both Rhino 5 as well as in Rhino 6 Trial - same result.

If this method has a problem - are there any alternatives in rh 5 and rhinocommon ?

Philipp (59.4 KB) (59.5 KB)

(Dale Fugier) #2

Hi @PhilO,

Brep.Trim(Plane, tolerance) essentially makes a PlaneSurface from the input plane and then calls Brep.Trim(Brep, tolerance). I’m guessing if you pass in a plane with unit vectors, it isn’t going to work very well.

You might try growing your plane so it extends past the bounds of the Brep being trimmed. PlaneSurface.CreateThoughBox will do this.

– Dale


Hi @dale,

thanks for the message.

There is a couple of things not clear to me yet. A plane should extend to infinity hence it is counter intuitive to me that a method would convert it internally to a finite PlaneSurface. A Planes XYZ components are always unit vectors as well from what I understand, so no way of scaling them. I also could not pass a big enough PlaneSurface into the method as it just accepts a Plane or Brep. I therefore tried creating a PlaneSurface of sufficient size and passed it as Brep into the method, yet again no Trim results.

In the end I resorted to generate Intersection Curves and use those to Split the Breps.

I just wonder why this method fails in specific cases like the above, it did just fine in others.

Many thanks,