Exemple #1
0
        private void showGeneralProperties(CivilSurface surface)
        {
            _editor.WriteMessage("\nSurface name: " + surface.Name);
            GeneralSurfaceProperties properties =
                surface.GetGeneralProperties();

            _editor.WriteMessage("\n- Max elevation: " +
                                 properties.MaximumElevation);
            _editor.WriteMessage("\n- Min elevation: " +
                                 properties.MinimumElevation);
        }
Exemple #2
0
        private bool elevationInSurfaceRange(double elevation,
                                             CivilSurface surface)
        {
            GeneralSurfaceProperties properties =
                surface.GetGeneralProperties();

            if (elevation < properties.MinimumElevation ||
                elevation > properties.MaximumElevation)
            {
                _editor.WriteMessage(
                    "\nSpecified elevation not in surface range.");
                return(false);
            }
            return(true);
        }
Exemple #3
0
        CreateElevationRegions(Surface surface, int steps, short[] colors)
        {
            GeneralSurfaceProperties props = surface.GetGeneralProperties();
            double minElevation            = props.MinimumElevation;
            double maxElevation            = props.MaximumElevation;
            double increment = (maxElevation - minElevation) / steps;

            SurfaceAnalysisElevationData[] newData = new SurfaceAnalysisElevationData[steps];

            for (int i = 0; i < steps; i++)
            {
                Color color = Color.FromColorIndex(ColorMethod.ByLayer, colors[i]);
                newData[i] = new SurfaceAnalysisElevationData(
                    minElevation + (increment * i),
                    minElevation + (increment * (i + 1)),
                    color);
            }
            return(newData);
        }