Ejemplo n.º 1
0
        public static PointSet interpolation(PPDictionary ppd)
        {//插值所有三角形
            PointSet result = new PointSet();

            foreach (KeyValuePair <Point, List <Point> > kv in ppd)
            {
                PointSet tps = interp(MyConvert.toPoint3d(kv.Key), MyConvert.toPoint3dList(kv.Value));
                if (tps != null)
                {
                    result.Add(tps);
                }
            }

            return(result);
        }
Ejemplo n.º 2
0
        public List <Point3d> getInnerBo(ObjectId[] ids)
        {
            if (mydb.InnerBoPL == null || mydb.InnerBoPL.Count == 0)
            {
                Point3d?p = getInnerBoPoint();
                if (p == null)
                {
                    return(null);
                }
                if (mydb.InnerBoPL == null)
                {
                    mydb.InnerBoPL = new List <Point>();
                }
                mydb.InnerBoPL.Add(new Point(p.Value.X, p.Value.Y, p.Value.Z));
            }
            List <Point3d> lp = PreProcess.getOuterBoundaryFromLine(ids, MyConvert.toPoint3d(mydb.InnerBoPL[0]));

            return(lp);
        }
Ejemplo n.º 3
0
        public static PointSet interpolation_partial(PPDictionary ppd)
        {
            PointSet result = new PointSet();
            int      count  = ppd.index.Count;
            List <InterpolatedPoint> lip = new List <InterpolatedPoint>();

            for (int i = 0; i < count; i++)
            {
                KeyValuePair <Point, List <Point> > kv  = ppd.index[i];
                List <InterpolatedPoint>            tps = interp2(MyConvert.toPoint3d(kv.Key), MyConvert.toPoint3dList(kv.Value));
                if (tps != null)
                {
                    lip.AddRange(tps);
                }
            }
            lip.Sort(new InterpolatedPointComparer());
            count = lip.Count / 5;
            for (int i = 0; i < count; i++)
            {
                result.Add(lip[i].point);
            }
            return(result);
        }