Exemplo n.º 1
0
 public void dump(string name = "MarkSeg")
 {
     DOut.pl(name + " {");
     DOut.Indent++;
     FigSeg.dump("FSegment");
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 2
0
 public static void dump(this Vector3d v, string prefix = nameof(Vector3d))
 {
     DOut.pl(prefix + "{");
     DOut.Indent++;
     DOut.pl("x:" + v.X.ToString());
     DOut.pl("y:" + v.Y.ToString());
     DOut.pl("z:" + v.Z.ToString());
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 3
0
 public static void dump(this CadVertex v, string prefix = nameof(CadVertex))
 {
     DOut.pl(prefix + "{");
     DOut.Indent++;
     DOut.pl("x:" + v.X.ToString());
     DOut.pl("y:" + v.Y.ToString());
     DOut.pl("z:" + v.Z.ToString());
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 4
0
 public void dump(string name = "FigureSegment")
 {
     DOut.pl(name + "{");
     DOut.Indent++;
     DOut.pl("Valid:" + Valid.ToString());
     P0.dump("P0");
     P1.dump("P1");
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 5
0
 public void dump(string name = "FigureSegment")
 {
     DOut.pl(name + "{");
     DOut.Indent++;
     DOut.pl("FigureID:" + Figure.ID.ToString());
     DOut.pl("SegIndex:" + SegIndex.ToString());
     DOut.pl("Index0:" + Index0.ToString());
     DOut.pl("Index1:" + Index1.ToString());
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 6
0
 public void dump(string name = "")
 {
     DOut.pl(nameof(UMatrix4) + " " + name + " {");
     DOut.Indent++;
     DOut.pl(M11.ToString() + ", " + M12.ToString() + ", " + M13.ToString() + ", " + M14.ToString());
     DOut.pl(M21.ToString() + ", " + M22.ToString() + ", " + M23.ToString() + ", " + M24.ToString());
     DOut.pl(M31.ToString() + ", " + M32.ToString() + ", " + M33.ToString() + ", " + M34.ToString());
     DOut.pl(M41.ToString() + ", " + M42.ToString() + ", " + M43.ToString() + ", " + M44.ToString());
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 7
0
 public static void Dump(UMatrix4 m, string prefix)
 {
     DOut.p(prefix);
     DOut.pl("{");
     DOut.Indent++;
     DOut.pl(m.M11.ToString() + "," + m.M12.ToString() + "," + m.M13.ToString() + "," + m.M14.ToString());
     DOut.pl(m.M21.ToString() + "," + m.M22.ToString() + "," + m.M23.ToString() + "," + m.M24.ToString());
     DOut.pl(m.M31.ToString() + "," + m.M32.ToString() + "," + m.M33.ToString() + "," + m.M34.ToString());
     DOut.pl(m.M41.ToString() + "," + m.M42.ToString() + "," + m.M43.ToString() + "," + m.M44.ToString());
     DOut.Indent--;
     DOut.pl("}");
 }
Exemplo n.º 8
0
 public void dump(string name = "MarkPoint")
 {
     DOut.pl(name + " {");
     if (Figure != null)
     {
         DOut.pl($"FigID:{Figure.ID}");
     }
     DOut.pl($"PointIndex:{PointIndex}");
     Point.dump("Point");
     PointScrn.dump("PointScrn");
     DOut.pl("}");
 }
Exemplo n.º 9
0
        public void dump()
        {
            DOut.pl(this.GetType().Name);
            DOut.pl("{");
            DOut.Indent++;
            DOut.pl("UndoStack [");
            DOut.Indent++;



            DOut.Indent--;
            DOut.Indent--;
            DOut.pl("}");
        }
Exemplo n.º 10
0
        //public static PointPair LeftTopRightBottom2D(Vector3d p0, Vector3d p1)
        //{
        //    double lx = p0.X;
        //    double rx = p1.X;

        //    double ty = p0.Y;
        //    double by = p1.Y;

        //    if (p0.X > p1.X)
        //    {
        //        lx = p1.X;
        //        rx = p0.X;
        //    }

        //    if (p0.Y > p1.Y)
        //    {
        //        ty = p1.Y;
        //        by = p0.Y;
        //    }

        //    return new PointPair(CadVertex.Create(lx, ty, 0), CadVertex.Create(rx, by, 0));
        //}

        public static void Dump(Vector4d v, string prefix)
        {
            DOut.Begin();

            DOut.p(prefix);
            DOut.pl("{");
            DOut.Indent++;
            DOut.pl("x:" + v.X.ToString());
            DOut.pl("y:" + v.Y.ToString());
            DOut.pl("z:" + v.Z.ToString());
            DOut.pl("w:" + v.W.ToString());
            DOut.Indent--;
            DOut.pl("}");

            DOut.End();
        }
Exemplo n.º 11
0
        public void dump()
        {
            DOut.pl(nameof(MatrixMN) + "{");
            DOut.Indent++;

            for (int r = 0; r < RN; r++)
            {
                for (int c = 0; c < CN; c++)
                {
                    DOut.p(v[r, c].ToString() + ",");
                }
                DOut.pl("");
            }

            DOut.Indent--;
            DOut.pl("}");
        }
Exemplo n.º 12
0
        public List <Result> Search(CadVertex p, double range)
        {
            TargetPoint = p;
            Range       = range;

            ResultList.Clear();

            SegList.Clear();

            CheckZeroPoint();

            Controller.DB.ForEachEditableFigure(CheckFig);

            CheckCross();

            ResultList.Sort((a, b) =>
            {
                return((int)(a.Dist * 1000 - b.Dist * 1000));
            });

            DOut.pl($"ResultList.Count:{ResultList.Count}");

            return(ResultList);
        }