예제 #1
0
        /// <summary>
        /// Add a parallelepipedic box defined by a point (`x', `y', `z') and the
        /// extents along the x-, y- and z-axes. If `tag' is positive, set the tag
        /// explicitly; otherwise a new tag is selected automatically. Return the tag
        /// of the box.
        /// </summary>
        public int AddBox(double x, double y, double z, double dx, double dy, double dz, int tag = -1)
        {
            var api = GMshNativeMethods.gmshModelOccAddBox(x, y, z, dx, dy, dz, tag, ref ierr);

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