6

The documentation says that RegionIntersection is not implemented for MeshRegion objects embedded in 3D. But I have one such region and would like to slice it with xy, yz, and xz planes, and I can't figure out how.

Here are two example inputs regions:

r1 = RegionBoundary@ConvexHullMesh[RandomReal[{-1, 1}, {200, 3}]]
r2 = InfinitePlane[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]

and this is what I've tried that fails:

enter image description here

M.R.
  • 31,425
  • 8
  • 90
  • 281

1 Answers1

8

You can intersect 3D primitives separately:

Show[r1, Graphics3D[
  DeleteCases[RegionIntersection[r2, #] & /@ MeshPrimitives[r1, 2], _EmptyRegion]]]

enter image description here

The intersection is a set of lines since r1 is a boundary region.

ybeltukov
  • 43,673
  • 5
  • 108
  • 212