Exemple #1
0
        /// <summary>
        /// Add a curve loop (a closed wire) formed by the curves `curveTags'.
        /// `curveTags' should contain tags of curves forming a closed loop. Note that
        /// an OpenCASCADE curve loop can be made of curves that share geometrically
        /// identical (but topologically different) points. If `tag' is positive, set
        /// the tag explicitly; otherwise a new tag is selected automatically. Return
        /// the tag of the curve loop.
        /// </summary>
        public int AddCurveLoop(IEnumerable <int> curveTags, int tag = -1)
        {
            var api = GMshNativeMethods.gmshModelOccAddCurveLoop(curveTags.ToArray(), curveTags.Count().ToUint(), tag, ref ierr);

            if (ierr != 0)
            {
                throw new GMshException(ierr);
            }
            return(api);
        }