Grid surface


https://www.nevron.com/Forum/Topic12636.aspx
Print Topic | Close Window

By Manal Goyal - 6 Years Ago
Hi,


Is it possible to place grid surface at a custom position in chart?



Something like this!!
By Nevron Support - 6 Years Ago
Hi Manal,

Yes - you can specify the origin point along the x / depth axes as well as the step for each grid cell. The following code shows how to position a surface to cover the range [0, 100] and [0, 100] along the x / depth axes:

   double x1 = 0;
    double x2 = 100;

    double z1 = 0;
    double z2 = 100;

    if (gridSurface.Data.GridSizeX > 1 && gridSurface.Data.GridSizeZ > 1)
    {
      gridSurface.UseCustomXOriginAndStep = true;
      gridSurface.OriginX = x1;
      gridSurface.StepX = (x2 - x1) / (gridSurface.Data.GridSizeX - 1);

      gridSurface.UseCustomZOriginAndStep = true;
      gridSurface.OriginZ = z1;
      gridSurface.StepZ = (z2 - z1) / (gridSurface.Data.GridSizeZ - 1);
    }

Hope this helps - let us know if you have any questions.
By Manal Goyal - 6 Years Ago
Works perfectly,
Thank you