Beispiel #1
0
    public void setXSectionDepthsFromFlow(ref Dictionary <string, double> flowsForXSection)
    {
        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            WaterSurfacePolygon waterSurface = waterSurfaces[i - 1];
            XSection            xsection     = xss[i - 1];

            if (flowsForXSection.ContainsKey(xsection.StationName))
            {
                xsection.SetElevationFromFlow(flowsForXSection[xsection.StationName]);
            }

            int start = xsection.XSCutLine.Count;
            xsection = xss[i];

            if (flowsForXSection.ContainsKey(xsection.StationName))
            {
                xsection.SetElevationFromFlow(flowsForXSection[xsection.StationName]);
            }

            waterSurface.calculateNormalsAndDs();
        }
    }
Beispiel #2
0
    public void CreateTriangulationForWaterSurface()
    {
        waterSurfaces.Clear();

        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            List <Point> watersurfacePoints = new List <Point>();
            XSection     xsection           = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }


            xsection = xss[i];

            for (int j = xsection.XSCutLine.Count - 1; j >= 0; j--)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            WaterSurfacePolygon wsurface = new WaterSurfacePolygon(watersurfacePoints);
            waterSurfaces.Add(wsurface);
        }
    }
Beispiel #3
0
    public void setWaterSurfaceDepth()
    {
        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            WaterSurfacePolygon waterSurface = waterSurfaces[i - 1];
            XSection            xsection     = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                waterSurface.Points[j].Z = xsection.CurrentWaterSurfaceElevation;
            }

            int start = xsection.XSCutLine.Count;

            xsection = xss[i];

            for (int j = start; j < waterSurface.Points.Count; j++)
            {
                waterSurface.Points[j].Z = xsection.CurrentWaterSurfaceElevation;//.Add(new Point(p.X, p.Y, uplevel));
            }

            waterSurface.calculateNormalsAndDs();
        }
    }
Beispiel #4
0
    public void CreateTriangulationForWaterSurface()
    {
        waterSurfaces.Clear();

        List<XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            List<Point> watersurfacePoints = new List<Point>();
            XSection xsection = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            xsection = xss[i];

            for (int j = xsection.XSCutLine.Count - 1; j >= 0; j--)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            WaterSurfacePolygon wsurface = new WaterSurfacePolygon(watersurfacePoints);
            waterSurfaces.Add(wsurface);
        }
    }