Heatmap of height difference between two surfaces

Hi there.

I’m currently doing some work where I got a nurbs surface and an internal representation of a surface, consisting of points, and want to create a heatmap of how much our nurbs surface deviates from points “surface”. The points “surface” can be as dense as we want.
I imagine something that looks like what the CurvatureAnalasys command shows.

It would be needed in my plugin in a display conduit.

Is this possible to do?
Is there a feasible way of doing it?

Try PointDeviation command.

Sorry, I think I posted it in the wrong forum. Its a development question for my plugin.

I have written something similar to help me with hull shape recreation based on documentation/scan3d data or whatever. It is kind a similar to point deviation, but I find it faster and more responsive (with parallelism implemented for points in array). Closest point on brep to test point, and HSL color based on distance between closest point to test point. Also DisplayPipeline.DrawArrow works very well in display conduit, even for 20’000 of points & arrows. I find arrows more intuitive than point deviation “hair”.

At some point I may make it public under certain conditions as part of something bigger…

Hmm… I guess some coloured points could do it. It would just look better with a result like CurvatureAnalasys makes, where a whole mesh/brep or what ever they use is coloured.

I’m also quite new to the whole thing still, so I’d love to know how you made the litte legend box?

You could also make it as coloured mesh. You could create analysis mesh from your brep, check distance of mesh nodes to target surface and map those values to nodes colors as false mesh color.

If you would analyse doc object then you could write specific visual analysis mode - but analysed object on which color would be displayed must be part of document - otherwise there is only option for false mesh color in display conduit.

For legend you could use DrawBitmap, which shall reference DisplayBitmap, which shall reference Bitmap, created for example as below:

    public Bitmap CreateLegendBackground()
        int legendwidth = 110;
        int legendheight = 225;
        Bitmap legend = new Bitmap(legendwidth, legendheight);
        for (int x = 0; x < legendwidth; x++)
            for (int y = 0; y < legendheight; y++)
                legend.SetPixel(x, y, Color.FromArgb(176, Color.White));
        return legend;

Hope it helps.

Thanks, that sounds like something in the right direction for sure.