Пример #1
0
        static Surface2D <T> BuildYZ(BoundingBox boundingBox, List <T> points, double meshSize)
        {
            var surf = new Surface2D <T>(boundingBox, meshSize);
            var yArr = new double[points.Count];
            var zArr = new double[points.Count];

            for (int j = 0; j < points.Count - 1; j++)
            {
                yArr[j] = points[j].Position.Y;
                zArr[j] = points[j].Position.Z;
            }
            for (int k = 0; k < surf.YSize; k++)
            {
                double y = surf.GetPointAt(0, k).Position.Y;
                double z = getZValue(y, yArr, zArr);
                for (int i = 0; i < surf.XSize; i++)
                {
                    var    t = new T();
                    double x = surf.GetPointAt(i, k).Position.X;
                    t.Position = new Vector3(x, y, z);
                    surf.SetValue(t, i, k);
                }
            }
            return(surf);
        }
Пример #2
0
        public static Surface2D <T> Build(List <Vector3> Points, double meshSize)
        {
            var boundingBox = BoundingBoxBuilder.FromPtArray(Points.ToArray());
            var surface     = new Surface2D <T>(boundingBox, meshSize);

            return(surface);
        }
Пример #3
0
 public Surface2D <T> Clone()
 {
     try
     {
         var surface = new Surface2D <T>(_boundingBox, _meshSize);
         foreach (T pt in _values)
         {
             surface.SetValue(pt, pt.Position);
         }
         return(surface);
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #4
0
        static Surface2D <T> BuildXYZ(BoundingBox boundingBox, List <T> points, double meshSize)
        {
            var surf = new Surface2D <T>(boundingBox, meshSize);

            return(surf);
        }
Пример #5
0
        public static Surface2D <T> Build(BoundingBox _boundingBox, double initValue, double meshSize)
        {
            var surface = new Surface2D <T>(_boundingBox, initValue, meshSize);

            return(surface);
        }