예제 #1
0
        /// <summary>
        /// Add a geometrical point in the OpenCASCADE CAD representation, at
        /// coordinates (`x', `y', `z'). If `meshSize' is > 0, add a meshing
        /// constraint at that point. If `tag' is positive, set the tag explicitly;
        /// otherwise a new tag is selected automatically. Return the tag of the
        /// point. (Note that the point will be added in the current model only after
        /// `synchronize' is called. This behavior holds for all the entities added in
        /// the occ module.)
        /// </summary>
        public int AddPoint(double x, double y, double z, int tag = -1, double meshSize = 0)
        {
            var api = GMshNativeMethods.gmshModelOccAddPoint(x, y, z, meshSize, tag, ref ierr);

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