Can a Mesh be generated directly without using ListContourPlot?
Background:
In this quite wonderful answer to Finding optimal points in contours produced by ListContourPlot, a method for extracting the values of the mesh of a particular contour of some set value is given. A similar method is mentioned in How to simultaneously extract contourvalues and contourline?, where instead the values are extracted from the contours themselves. It seems that the former method may be a bit more stable than the latter, and points to an underlying functionality of the generation of the mesh itself.
MWE:
The Mesh here is generated using ListContourPlot, how can we generate the Mesh directly, without using ListContourPlot? It would be great to be able to invoke something like GenerateMesh[dataTable, meshValueList, optionalRegionFn] and get as output the list of values given by lst in the example below. It is not included below, but an optional use of RegionFunction should be possible too, as it is related somewhat to the Mesh functionality of Mathematica.
dataTable = Table[{x, y, x - (y - 2/3)^2}, {x, 0, 1, .01}, {y, 0, 1, .01}];
plt = ListContourPlot[dataTable[[All, All, 3]], DataRange -> {{0, 1}, {0, 1}}, Mesh -> {{.5}}, MeshFunctions -> {(#3) &}, Contours -> 0];
lst = Cases[plt[[1]] // Normal, Line[z_] -> z, Infinity];
Flattenfrom theTableindataTable. I’ll update it, it works fine after that. It is now a MWE, from the previous MNWE, hah! $\endgroup$GeneralUtilities`PrintDefinitions, and I thinkListPlotsDump`iListContourPlotgrabs its contours fromVisualization`Core`ListContourPlotwhich is a kernel function; its implementation is hidden :( $\endgroup$