Пример #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();
        }
    }
Пример #2
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();
        }
    }