Beispiel #1
0
        /// <summary>
        /// Add an ellipse of center (`x', `y', `z') and radii `r1' and `r2' along the
        /// x- and y-axes respectively. If `tag' is positive, set the tag explicitly;
        /// otherwise a new tag is selected automatically. If `angle1' and `angle2'
        /// are specified, create an ellipse arc between the two angles. Return the
        /// tag of the ellipse. Note that OpenCASCADE does not allow creating ellipses
        /// with the major radius (along the x-axis) smaller than or equal to the
        /// minor radius (along the y-axis): rotate the shape or use `addCircle' in
        /// such cases.
        /// </summary>
        public int AddEllipse(double x, double y, double z, double r1, double r2, double angle1 = 0, double angle2 = 2 *Math.PI, int tag = -1)
        {
            var api = GMshNativeMethods.gmshModelOccAddEllipse(x, y, z, r1, r2, tag, angle1, angle2, ref ierr);

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