/// <summary> /// Add a sphere of center (`xc', `yc', `zc') and radius `r'. The optional /// `angle1' and `angle2' arguments define the polar angle opening (from -Pi/2 /// to Pi/2). The optional `angle3' argument defines the azimuthal opening /// (from 0 to 2*Pi). If `tag' is positive, set the tag explicitly; otherwise /// a new tag is selected automatically. Return the tag of the sphere. /// </summary> public int AddSphere(double xc, double yc, double zc, double radius, int tag = -1, double angle1 = -Math.PI / 2, double angle2 = Math.PI / 2, double angle3 = 2 *Math.PI / 2) { var api = GMshNativeMethods.gmshModelOccAddSphere(xc, yc, zc, radius, tag, angle1, angle2, angle3, ref ierr); if (ierr != 0) { throw new GMshException(ierr); } return(api); }