Ejemplo n.º 1
0
        void hideGrip(ExGripData pGrip)
        {
            int nViews = m_pDevice.NumViews;

            for (int i = 0; i < nViews; i++)
            {
                m_pDevice.ViewAt(i).Erase(pGrip);
            }
        }
Ejemplo n.º 2
0
        void showGrip(ExGripData pGrip)
        {
            int nViews = m_pDevice.NumViews;

            pGripTest = pGrip;
            for (int i = 0; i < nViews; i++)
            {
                m_pDevice.ViewAt(i).Add(pGrip);
            }
        }
Ejemplo n.º 3
0
        void updateInvisibleGrips()
        {
            ExGripDataCollection aOverall = new ExGripDataCollection();

            foreach (KeyValuePair <ObjectId, ExGripDataExt> grDataDc in m_gripDataDict)
            {
                foreach (ExGripData grData in grDataDc.Value.DataArray)
                {
                    aOverall.Add(grData);
                }
                foreach (ExGripDataSubent grDataSub in grDataDc.Value.DataSub)
                {
                    foreach (ExGripData grData in grDataSub.SubData)
                    {
                        aOverall.Add(grData);
                    }
                }
            }

            int iSize = aOverall.Count;

            for (int i = 0; i < iSize; i++)
            {
                ExGripData grData = aOverall[i];
                grData.Invisible = false;
                grData.Shared    = false;

                IntegerCollection aEq = new IntegerCollection();
                aEq.Add(i);

                Point3d ptIni = grData.Point;

                int       iNext = i + 1;
                Tolerance tc    = new Tolerance(1E-6, 1E-6);
                while (iNext < iSize)
                {
                    Point3d ptCur = aOverall[iNext].Point;
                    if (ptIni.IsEqualTo(ptCur, tc))
                    {
                        aEq.Add(iNext);
                        iNext++;
                    }
                    else
                    {
                        break;
                    }
                }

                if (aEq.Count >= 2)
                {
                    int iVisible = 0;
                    int jSize    = aEq.Count;
                    for (int j = 0; j < iSize; j++)
                    {
                        ExGripData pGrip = aOverall[aEq[j]];

                        bool bOk = true;
                        if (pGrip.Data != null)
                        {
                            if (pGrip.Data.SkipWhenShared)
                            {
                                bOk = false;
                            }
                        }

                        if (bOk)
                        {
                            iVisible = j;
                            break;
                        }
                    }

                    for (int j = 0; j < iSize; j++)
                    {
                        ExGripData pGrip = aOverall[aEq[j]];
                        pGrip.Shared    = true;
                        pGrip.Invisible = (j != iVisible);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 public void Add(ExGripData grData)
 {
     this.List.Add(grData);
 }