My plan is to effect a 3D extrusion by forming a cross section region in the x-y plane, R, say, then use RegionMember[R,{x,y}] as part of the implicit specification of a 3D region extending from zMin to zMax.
I’ll start with what appears to work. I picked a regular pentagon cross section, and generated from it an object that appears to have a Head == MeshRegion and that returns True to MeshRegionQ. (a condition not guaranteed, I’ve found.)
xSection = DiscretizeRegion[RegularPolygon[5]]
{Head[#], MeshRegionQ[#]}&@% // TableForm
When I use membership in xSection as part of the specification of bounds for a RegionPlot3D, a Graphics3D is returned, and that can be converted to an apparently legal MeshRegion using DiscretizeGraphics[] thus:
DiscretizeGraphics[
RegionPlot3D[
RegionMember[xSection, {x, y}]
, {x, -1., 1.}
, {y, -1., 1.}
, {z, -0.5, 0.5}
]
]
{Head[#], MeshRegionQ[#]}&@% // TableForm
The return is a presentable prismatic extrusion, subject to the limitations of RegionPlot3D.
Applying the form to ImplicitRegion fails, though.
ImplicitRegion[
RegionMember[xSection, {x, y}]
, {x, y, {z, -0.5, 0.5}}
]
ImplicitRegion::bcond: RegionMember[,{x,y}] should be a Boolean combination of equations, inequalities, and Element statements.
I sort of get that RegionMember returns True/False if I give it a “numeric point” (I suppose that’s how RP3D works), but it also offers to “gives conditions for the point {x,y,[Ellipsis]} to be a member of reg.”.It seems like that should be a “Boolean combination of equations.”
RegionMember[reg] returns a RegionMemberFunction, but that doesn’t seem to work as I expected either.
rmf = RegionMember[xSection]
ImplicitRegion[
rmf[{x, y}]
, {x, y, {z, -0.5, 0.5}}]
ImplicitRegion::bcond: RegionMemberFunction[,2,Region`Mesh`CanonicalDistance[True]][{x,y}] should be a Boolean combination of equations, inequalities, and Element statements.
What is it about this I don’t understand?
Cheers,
Fred






