コード例 #1
0
        private static IntPtr CRhinoObjectGrips_NurbsSurfaceGrip(int serial_number, int i, int j)
        {
            IntPtr            rc    = IntPtr.Zero;
            CustomObjectGrips grips = FromSerialNumber(serial_number);

            if (grips != null)
            {
                try
                {
                    GripObject grip = grips.NurbsSurfaceGrip(i, j);
                    if (grip != null)
                    {
                        rc = grip.NonConstPointer();
                    }
                }
                catch (Exception ex)
                {
                    Rhino.Runtime.HostUtils.ExceptionReport(ex);
                }
            }
            return(rc);
        }
コード例 #2
0
        private static IntPtr CRhinoObjectGrips_NeighborGrip(int serial_number, int gripIndex, int dr, int ds, int dt, int wrap)
        {
            IntPtr            rc    = IntPtr.Zero;
            CustomObjectGrips grips = FromSerialNumber(serial_number);

            if (grips != null)
            {
                try
                {
                    GripObject grip = grips.NeighborGrip(gripIndex, dr, ds, dt, wrap != 0);
                    if (grip != null)
                    {
                        rc = grip.NonConstPointer();
                    }
                }
                catch (Exception ex)
                {
                    Rhino.Runtime.HostUtils.ExceptionReport(ex);
                }
            }
            return(rc);
        }