Profile Picture

How to update a specific point in an NTriangulatedSurfaceSeries?

Posted By Joël Golinucci 10 Years Ago

How to update a specific point in an NTriangulatedSurfaceSeries?

Author
Message
Joël Golinucci
Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 30, Visits: 61
Hi,

I'm filling an NTriangulatedSurfaceSeries with a list of 3D points as initalization for a graph:

FChartControl.SuspendLayout()
FSurfaceSeries.Values.Clear()
FSurfaceSeries.XValues.Clear()
FSurfaceSeries.ZValues.Clear()

For Each pt As Point3DF In pPoints
  Dim x As Double = pt.X
  Dim y As Double = pt.Y
  Dim z As Double = pt.Z
  Dim cell As TCell = Globals.GetCellByPos(pt.AsPoint3D(scaleFactor))
  Dim product As TCell.TProduit = If(cell IsNot Nothing, cell.Produit, Nothing)

  FSurfaceSeries.XValues.Add(x)
  FSurfaceSeries.ZValues.Add(y)
  FSurfaceSeries.Values.Add(z)
  FSurfaceSeries.Colors.Add(GetColorByProduct(product))
Next

FChartControl.ResumeLayout()
FChartControl.Refresh()

Then, periodically, I receive a serie of points corresponding to a slice in the depth axis (all points with same X value).
How do I update the FSurfaceSeries.Values(...) with the new elevation values? How are the points ordered in the serie?

Thanks for your help,

Best regards

Joël

Nevron Support
Posted 10 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: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Joel,

We're not sure that we understand the question, however the triangulation will not affect the order of the coordinates you passed to the series so the points will remain in the same order as you passed them...


Best Regards,
Nevron Support Team



Joël Golinucci
Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 30, Visits: 61
Hi,

To rephrase my question, I would like to know if I always need to use 
  FSurfaceSeries.XValues.Add(x)
  FSurfaceSeries.ZValues.Add(y)
  FSurfaceSeries.Values.Add(z)


Even when all the possible X and Depth values have been entered and only the Values (elevation) will change.

Periodically I receive an event with an X parameter and a series of points creating a slice (2D) with the Depths and elevations and I want to update my triangulated surface with these new values, assigning for each new X-Z pair a new elevation value.

Should I use FSurfaceSeries.Values(???) = newElevationValue or keep adding the X, Depth and Elevation values to the lists.

If the answer is the first one, what should I put inside the bracets and if it's the second one, won't there be an out of memory exception after a certain time?

Thanks for your help,

Best regards,
Joël



Nevron Support
Posted 10 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: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Joel,

You can think of the triangulated surface data as if it is a table with 3 columns (x, y, z). The columns themselves do not differ from the other double series and therefore can be indexed - for example:

// add the point [10, 10, 10]
   surface.XValues.Add(10);
   surface.YValues.Add(10);
   surface.ZValues.Add(10);

// then modify that point to [20, 20, 20]
   int lastIndex = surface.XValues.Count - 1;

   surface.XValues[lastIndex] = 20;
   surface.YValues[lastIndex] = 20;
   surface.ZValues[lastIndex] = 20;

Sure you can get a memory exception if you add a lot of data Smile...

Hope this helps - let us know if you have any questions.




Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic