public static IPolycurve DensifyPolycurve(ref IPolycurve ipolycurve_0, ref int int_0) { IPolycurve polycurve = Utils3D.CreateClone(ipolycurve_0 as IClone) as IPolycurve; polycurve.Densify(Convert.ToDouble(polycurve.Length / (double)int_0), 0.0); return(polycurve); }
private static IPointCollection ReturnMidPoints(IPointCollection ipointCollection_0) { IPointCollection pointCollection = new Polyline(); object value = Missing.Value; for (int i = 1; i <= ipointCollection_0.PointCount - 2; i++) { IPoint point = ipointCollection_0.get_Point(i); IPoint point2 = ipointCollection_0.get_Point(i + 1); IPath path = new Path() as IPath; Utils3D.MakeZMAware(path, true); path.FromPoint = point; path.ToPoint = point2; IPoint point3 = new Point(); Utils3D.MakeZMAware(point3, true); path.QueryPoint(esriSegmentExtension.esriNoExtension, 0.5, true, point3); point3.Z = (point.Z + point2.Z) / 2.0; pointCollection.AddPoint(Utils3D.CreateClone(point3 as IClone) as IPoint, ref value, ref value); } return(null); }