John, Thanks for keeping this discussion alive.
"but the docs and examples say to use "cond", so you know a mesh would not work?"
I'm not that bright or insightful. I'll try to explain. To my mind, RegionMember[ ] is a perfectly respectable 'cond', working in a way I think is predictable, but the inconsistencies clutter up my thinking.
regInfo[r_] := {{#}, {"Head", Head[#]}, {"Region?",
RegionQ[#]}, {"MeshRegion?",
MeshRegionQ[#]}, {"BoundaryMeshRegion?",
BoundaryMeshRegionQ[#]}, {"SolidRegion?",
SolidRegionQ[#]}, {"ConstantRegion?",
ConstantRegionQ[#]}, {"Dimension",
RegionDimension[#]}, {"Embedding Dimension",
RegionEmbeddingDimension[#]}} &@r // TableForm
p5 = RegularPolygon[5];
regInfo[%]
p5Mesh = DiscretizeRegion[p5];
regInfo[%]
Both p5 and p5Mesh are Regions and ConstantRegions, so they're legal arguments for RegionMember[]. As a Boolean expression (in the sense that it returns True or False when fed point co-ordinates {x, y}), RegionMember[] behaves in an uncomplicated way in uncomplicated circumstances:
Graphics[
{If[RegionMember[p5, #], Red, LightGray], Point[#]} & /@
RandomReal[{-1, 1}, {1000, 2}]
, ImageSize -> Tiny]
Graphics[
{If[RegionMember[p5Mesh, #], Red, LightGray], Point[#]} & /@
RandomReal[{-1, 1}, {1000, 2}]
, ImageSize -> Tiny]
RegionPlot[], digests RegionMember[p5, {x, y}], gags a little on RegionMember[p5Mesh, {x, y}], but both forms give presentable, indistinguishable plots with numerically similar, if not ===, parts..
RegionPlot[RegionMember[p5, {x, y}], {x, -1.1, 1.1}, {y, -1.1, 1.1},
ImageSize -> Tiny]
Quiet@RegionPlot[
RegionMember[p5Mesh, {x, y}], {x, -1.1, 1.1}, {y, -1.1, 1.1},
ImageSize -> Tiny]
Max@Flatten[%[[1, 1, 1]] - %%[[1, 1, 1]]]
The 2D versions of RegionMember[p5] and RegionMember[p5Mesh] seem to work interchangeably in RegionPlot3D[]:
RegionPlot3D[RegionMember[p5, {x, y}], {x, -1.1, 1.1}, {y, -1.1, 1.1}, {z, -0.5,
0.5}, ImageSize -> Tiny]
RegionPlot3D[RegionMember[p5Mesh, {x, y}], {x, -1.1, 1.1}, {y, -1.1,
1.1}, {z, -0.5, 0.5}, ImageSize -> Tiny]
but ImplicitRegion[] is the holdout.
ImplicitRegion[RegionMember[p5, {x, y}], {x, y}]
ImplicitRegion[RegionMember[p5Mesh, {x, y}], {x, y}]
In summary, no, it's still not clear to me that a mesh shouldn't work.
That isn't to say I'd now want to use it for an extrusion, but how about a helical extrusion? What's the synthetic geometric element for a screw transform?
Cheers,
Fred