Hello there!
I'm trying to create a smooth surface routine, based on the Edge Midpoints, using essentially this code:
Dim oSurface As TinSurface = CType(surfaceId.GetObject(OpenMode.ForWrite), TinSurface)
Dim output As SurfacePointOutputOptions = New SurfacePointOutputOptions
output.OutputLocations = SurfacePointOutputLocationsType.EdgeMidPoints
output.Edges = ????
How can I fill the Edges parameter with all triangle edges of my surface?
Thanks!
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Normally the smoothing operations are for small areas. But, you need to pass a collection of edges that you get from the triangles and/or the FindEdgeAtXY() method of the surface. You can get the XY by using a polyline to define the area you want to smooth, then use the SampleElevations() method of the surface, this will return 3dPoints wherever the polyline crosses the TIN.
You can use the GetTriangles() method, then iterate that to get the Edge1, Edge2, & Edge3 properties, adding each one to a new TinSurfaceEdgeCollection (making sure not to add duplicates).
Note that I have not tested any of this, just going by the Object model.