and I would to ask if is possible to generate a colored region Mesh, with smoothed contour, like the below image, having the points list and their respective values.
There some problems to expose before passing to the solution:
“mesh” and “smooth” don’t really go along very well;
your mesh is colored like a picture, each square face have its color (and is not welded to neighbors), while usually mesh are colored per-vertex.
Here you could convert each pixel-square in a vertex, resulting in a new mesh which is 1 face shorter in width and height. Or you could calculate the vertex color/value from the neighbor faces, as i did.
you didn’t deliver a gradient to “translate” from color to numbers and vice-versa, so i just ignored the colors and worked with the numbers.
Now, the idea would be to move the mesh vertexes on Z by their values, and then slice the mesh into regions. But that’s old story and slow.
Instead, luckily for us @laurent_delrieu exist!
I’m using Laurent’s c# code from Divide mesh along contour line
An alternative, to achieve some more “smoothness”, is to use mesh Z data not for the mesh itself but to build a nurbs surface (possible only with grid-like structure, like your mesh), and then doing the slicing:
Amazing!!!
Thank you for your time and for letting me know the Laurent script.
I hope can I still benefit from your experience with GH one more time, and ask if is possible to fill with a color to be defined, the various regions between the ISOs.
Explanation of the process is 20x harder than the definition itself, at least for me.
Just know that you can directly convert RGB colors to XYZ points and vice-versa, and that’s handy for cases like this one!
PS the 0-255 integer rounding make the dark red area actually “flat”, but thanks to the “H(er)DR” of the values we can extract iso curves even inside of it, showing more details of your map.
Probably this all would be done much faster with photoshop+illustrator …
This is what I have been looking for many years!! Would also be possible to make the coloring of each region editable and result at end a vertex mesh, that I can bake in Rhino and be able to render, or is to complex?
I’m not familiar with all the technical terms, but I hope to be clear.
I have attached and internalized the type of mesh that I wish could come out of your script. re_Mesh_split.gh (129.6 KB)
I realized that from your script, the coloring is given by the custom preview almost as a type of material, which is then also editable in rhino, but visible only in the “Render” window.
If you could bake the mesh that I saved, you will see that the color is internalized in the mesh and not editable, (and visible, for example, also in the “Shadow” window)
In other cases, I have this error: “insufficient vertices for a mesh”, even if the mesh is formed by a perfect grid, and both the points of each face and their relative value, are congruent. This error leads me to have no division based on the range.
The sampling search distance was not scaled for that mesh, I’ve added a note there.
Your values list was just a big list of Nulls!
Then, there were multiple errors.
Your values are ranging from 0.1 to 1.775, but you were giving to c# Laurent script isos values far above that, like 5 or even 500.
Of course the script will outputting invalid/empty meshes as there were no samples at those iso values.
Also, your final color list have 11 colors, but you were using 12 isos.
And, please, avoid using “Faint” wires. You are blinding yourself from understanding what is going on. A default wire can display useful info! Don’t hide it!
Yes, i think it’s related on how your values have few decimals, so there is some rounding that is “unstable”.
See how I added decimals to the isos…
But I don’t know much more other than this…
I am very happy to find your solution, and I wanted to thank you.
I have a question, if I analyze 2 adjacent surfaces (such as 2 walls), the interpolation of 2 values from one surface to another creates a “gradient” error. I wanted to ask if there was the possibility of not interpolating the closest points of the edge of a surface with another.
Please avoid using “faint wire” setting, you are blinding yourself from understanding what is going on.
You had tree management problems.
Also, in this specific case I too were unable to use “List item”, so “Tree item” was the best choice.
This is correctly splitting and coloring according to your values: