Ejemplo n.º 1
0
        public Tangulation(GeoPoint2D[][] points, ISurface surface, double maxDeflection, Angle maxBending)
        {
#if DEBUG
            // DEBUG:
            DebuggerContainer dc = new DebuggerContainer();
            for (int i = 0; i < points.Length; ++i)
            {
                for (int j = 0; j < points[i].Length - 1; ++j)
                {
                    Line2D l2d = new Line2D(points[i][j], points[i][j + 1]);
                    dc.Add(l2d, System.Drawing.Color.Red, j);
                }
            }
#endif
            for (int i = 0; i < points.Length; ++i)
            {
                GeoPoint lastPoint, firstPoint;
                lastPoint = firstPoint = surface.PointAt(points[i][0]);
                for (int j = 0; j < points[i].Length; ++j)
                {
                    GeoPoint   nextPoint;
                    GeoPoint2D nextUVPoint;
                    if (j < points[i].Length - 1)
                    {
                        nextUVPoint = points[i][j + 1];
                        nextPoint   = surface.PointAt(nextUVPoint);
                    }
                    else
                    {
                        nextUVPoint = points[i][0];
                        nextPoint   = firstPoint;
                    }
                    GeoPoint2D uvMiddle = new GeoPoint2D(points[i][j], nextUVPoint);
                    GeoPoint   loc;
                    GeoVector  diru, dirv;
                    surface.DerivationAt(uvMiddle, out loc, out diru, out dirv);
                    PlanePolygon pp = new PlanePolygon(uvMiddle, loc, diru, dirv, lastPoint, nextPoint, this);
                }
            }
        }
Ejemplo n.º 2
0
 public static DebuggerContainer Show(this IEnumerable <object> obj)
 {
     return(DebuggerContainer.Show(obj));
 }