How to update a specific point in an NTriangulatedSurfaceSeries?


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


Joël Golinucci
Joël Golinucci
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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
Joël Golinucci
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
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
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search