Domain _structureDomain; // the structure domain of the project

        #endregion Fields

        #region Constructors

        public TunnelCSLoadWindow()
        {
            InitializeComponent();

            ISimpleLineSymbol outline = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _fillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Cyan, SimpleFillStyle.Solid, outline);
            _lineSymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Blue, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _arrowFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Blue, SimpleFillStyle.Solid, outline);
            _IniStress = new SoilInitalStress();
            _slsGraphics = new Dictionary<string, IGraphicCollection>();

            Loaded += TunnelCSLoadWindow_Loaded;
            Unloaded += TunnelCSLoadWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }
            _geologyDomain = _prj.getDomain(DomainType.Geology);
            if (_geologyDomain == null) { _initFailed = true; return; }

            _allSLs = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs = new List<string>();
            foreach (DGObjects objs in _allSLs)
                _slLayerIDs.Add(objs.definition.GISLayerName);
        }
 void FormatResult(SoilInitalStress.IResult rIS)
 {
     TB_Pe1.Text = rIS.Pe1.ToString("0.0") + " kPa";
     TB_Pe2.Text = rIS.Pe2.ToString("0.0") + " kPa";
     TB_Qe1.Text = rIS.Qe1.ToString("0.0") + " kPa";
     TB_Qe2.Text = rIS.Qe2.ToString("0.0") + " kPa";
     TB_Pw1.Text = rIS.Pw1.ToString("0.0") + " kPa";
     TB_Pw2.Text = rIS.Pw2.ToString("0.0") + " kPa";
     TB_Qw1.Text = rIS.Qw1.ToString("0.0") + " kPa";
     TB_Qw2.Text = rIS.Qw2.ToString("0.0") + " kPa";
     TB_Pg.Text = rIS.Pg.ToString("0.0") + " kPa";
     TB_Result.Text = _IniStress.StrResult;
 }
        void GenerateGraphics(SegmentLining sl, double centerX, double centerZ, SoilInitalStress.IResult rIS)
        {
            IView view = InputViewCB.SelectedItem as IView;

            double zScale = view.eMap.ScaleZ;
            double radius = _IniStress.D / 2.0;
            double len = 5.0;   // drawing length for soil pressure, this is for Qe2.
            double gap = 1.0;   // drawing gap between soil pressure and water pressure.
            double x1, x2, x3, x4, x5, x6;
            double y, y1, y2, y3, y4, y5, y6;
            double max = rIS.Pw2;

            // left
            x1 = centerX - radius * zScale - gap;
            x2 = x1 - (rIS.Qe1 / max) * len;
            x3 = x1 - (rIS.Qe2 / max) * len;
            x4 = x3 - gap;
            x5 = x4 - (rIS.Qw1 / max) * len;
            x6 = x4 - (rIS.Qw2 / max) * len;
            y = centerZ;
            y1 = y - zScale * radius;
            y2 = y + zScale * radius;

            IGraphicCollection graphicResult = Runtime.graphicEngine.newGraphicCollection();
            IGraphicCollection gc = ShieldTunnelMappingUtility.DistributedLoad_Vertical(x1, x2, x3, y1, y2,
                _fillSymbol,_arrowFillSymbol,_lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }

            gc = ShieldTunnelMappingUtility.DistributedLoad_Vertical(x4, x5, x6, y1, y2,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }

            // right
            x1 = centerX + radius * zScale + gap;
            x2 = x1 + (rIS.Qe1 / max) * len;
            x3 = x1 + (rIS.Qe2 / max) * len;
            x4 = x3 + gap;
            x5 = x4 + (rIS.Qw1 / max) * len;
            x6 = x4 + (rIS.Qw2 / max) * len;

            gc = ShieldTunnelMappingUtility.DistributedLoad_Vertical(x1, x2, x3, y1, y2,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            string str = string.Format("Qe1={0:0.0} kPa", rIS.Qe1);
            IMapPoint p = Runtime.geometryEngine.newMapPoint(x2, y2, _spatialRef);
            IGraphic gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);
            str = string.Format("Qe2={0:0.0} kPa", rIS.Qe2);
            p = Runtime.geometryEngine.newMapPoint(x3, y1, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            gc = ShieldTunnelMappingUtility.DistributedLoad_Vertical(x4, x5, x6, y1, y2,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Qw1={0:0.0} kPa", rIS.Qw1);
            p = Runtime.geometryEngine.newMapPoint(x5, y2, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);
            str = string.Format("Qw2={0:0.0} kPa", rIS.Qw2);
            p = Runtime.geometryEngine.newMapPoint(x6, y1, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            // top
            x1 = centerX - radius * zScale;
            x2 = centerX + radius * zScale;
            y1 = centerZ + radius * zScale + gap;
            y2 = y1 + (rIS.Pg / max) * len;
            y3 = y2 + gap;
            y4 = y3 + (rIS.Pe1 / max) * len;
            y5 = y4 + gap;
            y6 = y5 + (rIS.Pw1 / max) * len;

            gc = ShieldTunnelMappingUtility.DistributedLoad_Horizontal(x1, x2, y1, y2, y2,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Pg={0:0.0} kPa", rIS.Pg);
            p = Runtime.geometryEngine.newMapPoint(x2, y2, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            gc = ShieldTunnelMappingUtility.DistributedLoad_Horizontal(x1, x2, y3, y4, y4,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Pe1={0:0.0} kPa", rIS.Pe1);
            p = Runtime.geometryEngine.newMapPoint(x2, y4, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            gc = ShieldTunnelMappingUtility.DistributedLoad_Horizontal(x1, x2, y5, y6, y6,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Pw1={0:0.0} kPa", rIS.Pw1);
            p = Runtime.geometryEngine.newMapPoint(x2, y6, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            // bottom
            y1 = centerZ - radius * zScale - gap;
            y2 = y1 - (rIS.Pe2 / max) * len;
            y3 = y2 - gap;
            y4 = y3 - (rIS.Pw2 / max) * len;

            gc = ShieldTunnelMappingUtility.DistributedLoad_Horizontal(x1, x2, y1, y2, y2,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Pe2={0:0.0} kPa", rIS.Pe2);
            p = Runtime.geometryEngine.newMapPoint(x2, y2, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            gc = ShieldTunnelMappingUtility.DistributedLoad_Horizontal(x1, x2, y3, y4, y4,
                _fillSymbol, _arrowFillSymbol, _lineSymbol, _spatialRef);
            foreach (IGraphic g in gc)
            {
                graphicResult.Add(g);
            }
            str = string.Format("Pw2={0:0.0} kPa", rIS.Pw2);
            p = Runtime.geometryEngine.newMapPoint(x2, y4, _spatialRef);
            gText = Runtime.graphicEngine.newText(str, p, Colors.Blue, "Arial", 14.0);
            graphicResult.Add(gText);

            _slsGraphics[sl.id.ToString() + view.eMap.MapID] = graphicResult;
        }
示例#4
0
 private static void ApplyLoad(ModelSetting modelSetting, Model model, SoilInitalStress.IResult load, int ringNo)
 {
 }