예제 #1
0
        /// <summary>
        /// Add a rectangle with lower left corner at (`x', `y', `z') and upper right
        /// corner at (`x' + `dx', `y' + `dy', `z'). If `tag' is positive, set the tag
        /// explicitly; otherwise a new tag is selected automatically. Round the
        /// corners if `roundedRadius' is nonzero. Return the tag of the rectangle.
        /// </summary>
        public int AddRectangle(double x, double y, double z, double dx, double dy, int tag = -1, double roundedRadius = 0)
        {
            var api = GMshNativeMethods.gmshModelOccAddRectangle(x, y, z, dx, dy, tag, roundedRadius, ref ierr);

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