Exemple #1
0
        //构造等分点
        private void button2_Click(object sender, EventArgs e)
        {
            delFeature("point");
            IPoint centerPoint = new PointClass();

            centerPoint.PutCoords(10, 10);
            IPoint fromPoint = new PointClass();

            fromPoint.PutCoords(0, 0);
            IPoint toPoint = new PointClass();

            toPoint.PutCoords(10, 20);
            ICircularArc circularArcConstruction = new CircularArcClass();

            circularArcConstruction.PutCoords(centerPoint, fromPoint, toPoint, esriArcOrientation.esriArcClockwise);
            IConstructMultipoint constructMultipoint = new MultipointClass();

            constructMultipoint.ConstructDivideEqual(circularArcConstruction as ICurve, (int)circularArcConstruction.Length / 5);
            IPointCollection pointCollection = constructMultipoint as IPointCollection;

            for (int i = 0; i < pointCollection.PointCount; i++)
            {
                addFeature("point", pointCollection.get_Point(i));
            }

            axMapControl1.Refresh();
        }