Profile Picture

shift drawing grid surface

Posted By Rinat Talibullin 12 Years Ago
Author
Message
Rinat Talibullin
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
Hello! I have problem with drawing mesh surface: it shifts on Z scale for Z size of grid. What I'm doing wrong?
Example is in attachment, as you can see, surface shifted in Z direction. Size of gridX = 16, gridZ = 768.

My source code is
NGridSurfaceSeries surface = (NGridSurfaceSeries)nChartDin.Charts[7].Series.Add(SeriesType.GridSurface);
surface.Name = "Surface";
surface.Legend.Mode = SeriesLegendMode.SeriesLogic;
surface.Legend.TextStyle.FontStyle.EmSize = new NLength(8, NGraphicsUnit.Point);
surface.PositionValue = 0;
surface.Data.SetGridSize(16, 768); //

surface.SmoothPalette = true;
surface.SyncPaletteWithAxisScale = false;
surface.PaletteSteps = 8;
surface.ValueFormatter.FormatSpecifier = "0.0";

// setup X axis
NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator();
scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Back, ChartWallType.Front };
scaleX.RoundToTickMin = false;
scaleX.RoundToTickMax = false;
nChartDin.Charts[7].Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX;

// setup Z axis
NLinearScaleConfigurator scaleZ = new NLinearScaleConfigurator();
scaleZ.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Left, ChartWallType.Front };
scaleZ.RoundToTickMin = false;
scaleZ.RoundToTickMax = false;
nChartDin.Charts[7].Axis(StandardAxis.Depth).ScaleConfigurator = scaleZ;

nChartDin.Charts[7].Enable3D = true;
nChartDin.Charts[7].Width = 50;
nChartDin.Charts[7].Depth = 50;
nChartDin.Charts[7].Height = 50;
nChartDin.Charts[7].Projection.Elevation = 28;
nChartDin.Charts[7].Projection.Rotation = -18;
nChartDin.Charts[7].LightModel.SetPredefinedLightModel(PredefinedLightModel.ShinyTopLeft);
nChartDin.Charts[7].Projection.Type = ProjectionType.Perspective;
nChartDin.Charts[7].Visible = false;

for (int i = 0; i < numDinSamples - numSamples; i++)
{
for (int m = 0; m < 16; m++)
{
surface.Data.SetValue(m, i, dataY[m]);
}
}


Attachments
example.png (252 views, 116.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
We were not able to reproduce the problem. Which version of the control are you using?

Best Regards,
Nevron Support Team



Rinat Talibullin
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
Version 11.9.27.12.

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
We tested the code with 11.9.27.12 and still the chart looked fine.

The Z size of the grid surface is 768 and normally the Depth Axis's range should be [0, 767]. This is what happens in our test project. However on the screenshot the depth axis's range is something like [0 - 1500]. This means that there is something outside this code that causes the problem.



Best Regards,
Nevron Support Team



Rinat Talibullin
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
What could cause such problems?
I've tried mesh surface - it works fine in axis depth.

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Are there any other series in the series collection of chart[7]?

Best Regards,
Nevron Support Team



Rinat Talibullin
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
No, there is no other series. If I try to add other series, I've got the same effect: every additional serie shifts on its size and then draws.

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Is it possible for you to send us a VS project that reproduces the problem? We created a test project with the source code that you sent us, but it works properly both with the latest version and with the version that you use (11.9.27.12).

Best Regards,
Nevron Support Team



Rinat Talibullin
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
Actually, it's pretty complicated. My application uses database and it's really hard to send you whole project. I'll think if its possible to send you part of this project.
What properties of the chart could affect series in such way?

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Maybe if you create a small test application and copy-paste chart related code in it the same problem will appear at some point. This is pretty much what we did, but we don't have the full source.


Regarding your question:

>> What properties of the chart could affect series in such way?

The chart is not supposed to act like this in a regular situation. It looks as if there is another (invisible) surface series before the visible surface, but you said this is not the case. (Just to make sure - you can clear the series collection before you add the surface series.) Apart from this - there are many other settings that affect the axes, and the cause might also be some problem in our code so it is not possible to tell. We must have some way to reproduce the problem.

By the way, did you try the same code with a recent version of Nevron Chart?

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic