//[IsVisibleInDynamoLibrary(false)]
        /// <summary>
        /// Removes the ShapePoint at index.
        /// </summary>
        /// <param name="index">The index.</param>
        /// <returns></returns>
        public ShapePointArray RemoveAtIndex(int index)
        {
            Utils.Log(string.Format("ShapePointArray.RemoveAtIndex started...", ""));

            ShapePointArray spa = this.Copy();

            if (index < 0 || index > spa.Count - 1)
            {
                throw new Exception("Invalid index");
            }

            spa.Points.RemoveAt(index);
            spa.Renumber();

            Utils.Log(string.Format("ShapePointArray.RemoveAtIndex completed.", ""));

            return(spa);
        }
Example #2
0
 internal MultiPoint(ShapePointArray shapePointArray)
 {
     this.ShapePoints = shapePointArray;
 }
Example #3
0
 /// <summary>
 /// Returns a MultiPoint by a collection of shape points.
 /// </summary>
 /// <param name="shapePointArray">The shape points.</param>
 /// <returns></returns>
 public static MultiPoint ByShapePointArray(ShapePointArray shapePointArray)
 {
     return(new MultiPoint(shapePointArray));
 }