# How can I plot a “slice” of the mesh for a 3D plot?

I'm using NDSolveValue to solve the Laplacian equation for this geometry:

I want to view the mesh that NDSolveValue is using, so I do the following:

Print@Show[
Graphics3D[{Opacity[0], lrectregion, Opacity[0], rrectregion},
ImageSize -> Large], sol["ElementMesh"]["Wireframe"]];


(where sol is the interpolated function that NDSolveValue returns. Its actual form doesn't matter for this question and the code used to produce it is hefty, so I didn't include it.)

However, it's hard to see what's actually going on in the 3D plot that gets generated:

If I manually zoom in on the boundaries (those rectangles), I can kind of see detail, but still not that well:

I know about these "slice" functions like SliceDensityPlot3D that are very helpful for seeing a 2D "slice" of a 3D function in 3D space. Is there anything like that for visualizing the mesh?

No, there is no SliceDensityPlot3D for mesh visualization. There is no density to plot. The mesh wireframe is a Graphics/Graphics3D object so you can use

sol["ElementMesh"]["Wireframe"[PlotRange -> {All, {40, 60}, All}]]


Show[
Graphics3D[{Opacity[0], lrectregion, Opacity[0], rrectregion},
ImageSize -> Large], sol["ElementMesh"]["Wireframe"[PlotRange -> {All, {40, 60}, All}]]
,Boxed->False
]


should do what you want.

• Thanks, this looks good. Just to be clear, I didn't think there was a density, I just meant the functionality of looking at a 2D slice of a 3D function. – YungHummmma Jun 1 '16 at 19:56