- Extract Points from Point3DCollection: Iterate through the Point3DCollection to extract the X, Y, and Z coordinates of each point.
- Create an MWNumericArray: Use the extracted coordinates to create an MWNumericArray object.
Point3dcollection to mwarray
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
HI everybody,
I need a help!!
I'm developping code in vb.net and i need to convert a point3dcollection (like {1.2,3.4,1.5 3.4,6.7,1.3 5.5,4.3,6.7 ........}) to a mwarray.
Somebody can help me?
Thanks
0 comentarios
Respuestas (1)
Hitesh
el 5 de Feb. de 2025
Hi gianluca.
To convert a Point3DCollection to an MWArray in VB.NET, you need to first extract the points from the Point3DCollection and then create an MWNumericArray using those points.
Kindly refer to the following function as an example:
Function ConvertToMWArray(points As Point3DCollection) As MWNumericArray
' Create a 2D array to hold the point data
Dim data(points.Count - 1, 2) As Double
' Populate the array with the point data
For i As Integer = 0 To points.Count - 1
data(i, 0) = points(i).X
data(i, 1) = points(i).Y
data(i, 2) = points(i).Z
Next
' Create an MWNumericArray from the 2D array
Dim mwArray As New MWNumericArray(data)
Return mwArray
End Function
0 comentarios
Ver también
Categorías
Más información sobre Deploy to .NET Applications Using MWArray API en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!