/// <summary> /// Add a b-spline curve of degree `degree' with `pointTags' control points. /// If `weights', `knots' or `multiplicities' are not provided, default /// parameters are computed automatically. If `tag' is positive, set the tag /// explicitly; otherwise a new tag is selected automatically. Create a /// periodic curve if the first and last points are the same. Return the tag /// of the b-spline curve. /// </summary> public int AddBSpline(IEnumerable <int> pointTags, IEnumerable <double> weights, IEnumerable <double> knots, IEnumerable <int> multiplicities, int tag = -1, int degree = 3) { var api = GMshNativeMethods.gmshModelOccAddBSpline(pointTags.ToArray(), pointTags.Count().ToUint(), tag, degree, weights.ToArray(), weights.Count().ToUint(), knots.ToArray(), knots.Count().ToUint(), multiplicities.ToArray(), multiplicities.Count().ToUint(), ref ierr); if (ierr != 0) { throw new GMshException(ierr); } return(api); }