Exemplo n.º 1
0
        public override void MoveAllPoints(Vector3d delta)
        {
            if (Locked)
            {
                return;
            }

            FigUtil.MoveAllPoints(this, delta);
        }
Exemplo n.º 2
0
        public static List <CadFigure> GetRootFigList(List <CadFigure> srcList)
        {
            HashSet <CadFigure> set = new HashSet <CadFigure>();

            foreach (CadFigure fig in srcList)
            {
                set.Add(FigUtil.GetRootFig(fig));
            }

            List <CadFigure> ret = new List <CadFigure>();

            ret.AddRange(set);

            return(ret);
        }
Exemplo n.º 3
0
        public override void MoveSelectedPointsFromStored(DrawContext dc, Vector3d delta)
        {
            //base.MoveSelectedPoints(dc, delta);

            if (Locked)
            {
                return;
            }

            Vector3d d;


            if (!IsSelectedAll() && mPointList.Count > 2 && RestrictionByNormal)
            {
                Vector3d vdir = dc.ViewDir;

                Vector3d a = delta;
                Vector3d b = delta + vdir;

                d = CadMath.CrossPlane(a, b, StoreList[0].vector, Normal);

                if (!d.IsValid())
                {
                    Vector3d nvNormal = CadMath.Normal(Normal, vdir);

                    double ip = CadMath.InnerProduct(nvNormal, delta);

                    d = nvNormal * ip;
                }
            }
            else
            {
                d = delta;
            }

            FigUtil.MoveSelectedPointsFromStored(this, dc, d);

            mChildList.ForEach(c =>
            {
                c.MoveSelectedPointsFromStored(dc, delta);
            });
        }