# Convert ConvexHull in a array to Inequality

This question is in continuation with the previous post Convert ConvexHull to Inequality

There are two problems that I faced. Suppose we have two or more convex hull defined using an array R[i], like

P={0,0,0};P={1,0,0};P={0,1,0};P={0,0,1};P={-1,-1,-1};P={-1,0,-1};
P={0,-1,-1};
R=ConvexHullMesh[{P,P,P,P}];
R=ConvexHullMesh[{P,P,P,P}];


Now to find the region inequality at once for all convex hull in the array I use a do loop as

    Do[regFunc[i][{x, y, z}] := FullSimplify @ RegionMember[Rationalize @ MeshPrimitives[DiscretizeRegion[R[i],  MaxCellMeasure -> \[Infinity]], 3][]] @ {x, y, z},{i,1,2}];
regFunc@{x,y,z}


But this gives error and so I have to manually write the whole code for each convex hull. Secondly, I want the region as a open region. This means that I want > or < not >= or <= . This is because later I will calculate region intersection using ImplicitRegion, where due to >= or <= the regions seem to intersect at the boundaries, which I don't want. Any possible way to do it in Mathematica?

The easy part of the question: (1) Use regFunc[i][{x_, y_, z_}] (not regFunc[i][{x, y, z}]) when you define regFunc, (2) Use With[{i = i}, ...] to inject the value of i on the right-hand-side expression:

Do[With[{i = i},
regFunc[i][{x_, y_, z_}] := FullSimplify@
RegionMember[
Rationalize@
MeshPrimitives[
DiscretizeRegion[R[i], MaxCellMeasure -> ∞], 3][]]@{x, y, z}],
{i, 1, 2}];

Column @ {regFunc@{x, y, z}, regFunc@{x, y, z}} Not sure about the second part, but maybe you can do this:

{regFunc@{x, y, z}, regFunc@{x, y, z}} /.
{LessEqual -> Less, GreaterEqual -> Greater} // Column 