cloudflight
2024-10-12 46e3091f9cdefc7e2ffbc69bcb9c39650b1c0587
1、修改用户输入的喷头流量系数为K系数,自动转换为EPA中的射流系数

2、Q3D中优化平移、缩放、旋转等操作
已修改8个文件
已添加1个文件
320 ■■■■ 文件已修改
Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/03-q3d/XhsProjectSimulationQ3dCtrl.Designer.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.Designer.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Draw.cs 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.cs 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/MapDimensions.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Template/Settings.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs
@@ -73,7 +73,8 @@
                var pTemp = o.DemandPattern;
                if (string.IsNullOrEmpty(pTemp) || pTemp == ";" || pTemp == "_") pTemp = "";
                junctionStringBuilder.AppendLine($"{o.Id}\t{o.Elev}\t{o.Demand}\t{pTemp}\t;\t" + $"0\tNozzle\t{o.Coefficient}");
                emitterStringBuilder.AppendLine(o.Id + "    " + o.Coefficient);
                double Coe = o.Coefficient * Math.Pow(10 / 101.972, 0.5) / 1000 * 60;
                emitterStringBuilder.AppendLine(o.Id + "    " + Coe);
                coorStringBuilder.AppendLine(o.Id + "    " + o.Position.X + "    " + o.Position.Y);
            });
@@ -256,6 +257,7 @@
            var net = new Network();
            if (InpPath == null || !File.Exists(InpPath)) return null;
            List<InpCoor> points = new List<InpCoor>();
            StreamReader sr = new StreamReader(InpPath);
            //try
            {
@@ -428,6 +430,16 @@
                                    }
                                }
                                break;
                            case "EMITTERS":
                                {
                                    string id = parts[0];
                                    if (double.TryParse(parts[1], out double x))
                                    {
                                        double Coefficient = x / Math.Pow(10 / 101.972, 0.5) * 1000 / 60;
                                        net.Nozzles.Find(o => o.Id == id).Coefficient = Coefficient;
                                    }
                                }
                                break;
                        }
                    }
                }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/03-q3d/XhsProjectSimulationQ3dCtrl.Designer.cs
@@ -38,8 +38,9 @@
            drawer1.Dock = DockStyle.Fill;
            drawer1.IsEditMode = true;
            drawer1.Location = new Point(0, 0);
            drawer1.MapCenter = (PointF)resources.GetObject("drawer1.MapCenter");
            drawer1.mapOption = (Yw.WinFrmUI.Q3d.MapDimensions)resources.GetObject("drawer1.mapOption");
            //var pf=(PointF)resources.GetObject("drawer1.MapCenter");
            //drawer1.MapCenter = new Yw.WinFrmUI.Q3d.PointF3D(pf.X,pf.Y,0);
            //drawer1.mapOption = (Yw.WinFrmUI.Q3d.MapDimensions)resources.GetObject("drawer1.mapOption");
            drawer1.Name = "drawer1";
            drawer1.Size = new Size(889, 597);
            drawer1.TabIndex = 0;
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup />
  <ItemGroup>
    <Compile Update="01-home\00-core\HomeXhsProjectPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="01-home\01-project\HomeXhsProjectTreeListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="01-home\02-map\MapViewProjectListContainer.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="01-home\03-property\HomeXhsProjectPropertyCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\01-import\00-core\ImportXhsProjectDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="02-project\01-import\01-info\InputXhsProjectInfoWizardPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\01-import\02-map\SetXhsProjectMapLocationWizardPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\01-import\03-generate\GenerateXhsProjectWizardPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\01-import\05-completed\ProjectResultShowPanel.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\02-bimface\ViewXhsProjectBimfacePage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\03-mgr\XhsProjectMgrPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="02-project\04-dlg\AddProjectDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="03-simulation\01-property\XhsProjectSimulationPropertyCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\02-bimface\XhsProjectSimulationBimfaceCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\04-scheme\AddXhsProjectSimulationSchemeDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="03-simulation\04-scheme\XhsProjectSimulationSchemeMgrCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\05-function\XhsProjectSimulationFunctionMgrCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\01-matching\00-core\XhsProjectSimulationMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\01-matching\02-pump\01-pumpsinglematching\PumpSingleMatchingForm.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\01-matching\05-elbows\XhsProjectSimulationElbowsMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\03-calcu\XhsProjectSimulationHydroCalcuFailedCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\04-unmatching\01-pump\XhsProjectSimulationPumpUnMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\05-search\XhsProjectSimulationSearchCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\XhsProjectSimulationMgrPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="04-pump\PumpFullInfoCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="04-pump\PumpFullInfoViewDlg.cs">
      <SubType>Form</SubType>
    </Compile>
  </ItemGroup>
</Project>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.Designer.cs
@@ -38,8 +38,9 @@
            drawer1.Dock = DockStyle.Fill;
            drawer1.IsEditMode = true;
            drawer1.Location = new Point(0, 0);
            drawer1.MapCenter = (PointF)resources.GetObject("drawer1.MapCenter");
            drawer1.mapOption = (Q3d.MapDimensions)resources.GetObject("drawer1.mapOption");
            //var pf = (PointF)resources.GetObject("drawer1.MapCenter");
            //drawer1.MapCenter = new Yw.WinFrmUI.Q3d.PointF3D(pf.X, pf.Y, 0);
            //drawer1.mapOption = (Q3d.MapDimensions)resources.GetObject("drawer1.mapOption");
            drawer1.Name = "drawer1";
            drawer1.Size = new Size(224, 174);
            drawer1.TabIndex = 0;
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Draw.cs
@@ -789,57 +789,113 @@
        // æ ¹æ®æ—‹è½¬è§’度计算旋转后的坐标
        // æ ¹æ®æ—‹è½¬è§’度计算旋转后的坐标
        private PointF Get平面旋转Point(PointF p, PointF MapC)
        /// <summary>
        /// è®¡ç®—围绕竖直线Z轴旋转后的坐标
        /// </summary>
        /// <param name="p">世界坐标</param>
        /// <param name="MapC"></param>
        /// <returns></returns>
        private PointF3D Get平面旋转Point(PointF3D p, PointF3D MapC)
        {
            PointF center = MapC;
            PointF3D center = MapC;
            double radian = Rotation * Math.PI / 180;  // è§’度转弧度
            float x = (float)(Math.Cos(radian) * (p.X - center.X) - Math.Sin(radian) * (p.Y - center.Y) + center.X);
            float y = (float)(Math.Sin(radian) * (p.X - center.X) + Math.Cos(radian) * (p.Y - center.Y) + center.Y);
            return new PointF(x, y);
            float z = p.Z;
            return new PointF3D(x, y, z);
        }
        private PointF Get平面还原Point(PointF p, PointF MapC)
        /// <summary>
        /// è®¡ç®—围绕竖直线Z轴旋转前的坐标
        /// </summary>
        /// <param name="p">p是世界坐标</param>
        /// <param name="MapC"></param>
        /// <returns></returns>
        private PointF3D Get平面还原Point(PointF3D p, PointF3D MapC)
        {
            PointF center = MapC;
            PointF3D center = MapC;
            double radian = -Rotation * Math.PI / 180;  // è§’度转弧度
            float x = (float)(Math.Cos(radian) * (p.X - center.X) - Math.Sin(radian) * (p.Y - center.Y) + center.X);
            float y = (float)(Math.Sin(radian) * (p.X - center.X) + Math.Cos(radian) * (p.Y - center.Y) + center.Y);
            return new PointF(x, y);
            float z = p.Z;
            return new PointF3D(x, y, z);
        }
        private PointF Get俯视角旋转Point(PointF p, float z, PointF MapC)
        /// <summary>
        /// å°†ä¸–界坐标投影到xy平面,建立投影坐标系,法向量为Zè½´
        /// </summary>
        /// <param name="p"></param>
        /// <param name="z"></param>
        /// <param name="MapC"></param>
        /// <returns></returns>
        private PointF Get俯视角投影Point(PointF3D p, PointF3D MapC)
        {
            PointF center = MapC;
            PointF3D center = MapC;
            double radian_fushi = ä¿¯è§†å¼§åº¦;
            float sin = (float)Math.Sin(radian_fushi);
            float cos = (float)Math.Cos(radian_fushi);
            float x = (float)p.X;
            float y = (float)(sin * (p.Y - center.Y) + center.Y) + cos * z;
            float y = (float)(sin * (p.Y - center.Y) + center.Y) + cos * p.Z - center.Z;
            float z = p.Z;
            return new PointF(x, y);
        }
        private PointF Get俯视角还原Point(PointF p, float z, PointF MapC)
        /// <summary>
        /// è®¡ç®—围绕X轴旋转前的坐标
        /// </summary>
        /// <param name="p"></param>
        /// <param name="z"></param>
        /// <param name="MapC"></param>
        /// <returns></returns>
        private PointF3D Get俯视角投影还原Point(PointF3D p, PointF3D MapC)
        {
            PointF center = MapC;
            PointF3D center = MapC;
            double radian_fushi = ä¿¯è§†å¼§åº¦;
            float sin = (float)Math.Sin(radian_fushi);
            float cos = (float)Math.Cos(radian_fushi);
            float x = (float)p.X;
            float y = (p.Y - center.Y - cos * z) / sin + center.Y;
            return new PointF(x, y);
            float x = p.X;
            float y = (p.Y - center.Y - cos * p.Z + center.Z) / sin + center.Y;
            float z = p.Z;
            return new PointF3D(x, y, z);
        }
        private PointF GetRotateVector(PointF p, PointF p0)
        /// <summary>
        /// è¾“入两个<屏幕坐标>的点,返回连接两点<世界坐标>的向量
        /// è¯¥æ–¹æ³•用来计算鼠标拖动/双击定位/鼠标位置缩放时,视角中心点的移动
        /// </summary>
        /// <param name="p">屏幕坐标</param>
        /// <param name="p0">屏幕坐标</param>
        /// <returns></returns>
        private PointF3D GetWorldVectorByScreenPoints(PointF p, PointF p0)
        {
            double radian = Rotation * Math.PI / 180;  // è§’度转弧度
            float x = (float)(Math.Cos(radian) * (p.X - p0.X) - Math.Sin(radian) * (p.Y - p0.Y));
            float y = (float)(Math.Sin(radian) * (p.X - p0.X) + Math.Cos(radian) * (p.Y - p0.Y));
            return new PointF(x, y);
            double radian_fushi = ä¿¯è§†å¼§åº¦;
            var wp0 = ScreenToMap(p0);
            var wp = ScreenToMap(p);
            //通过p0到p的点,构造一个二维向量
            var vector = new Vector2(wp.X - wp0.X, wp.Y - wp0.Y);
            //通过俯视角度,根据vector的Y分量,计算新的y和z分量
            float y = (float)(vector.Y * Math.Sin(radian_fushi));
            float z = (float)(vector.Y * Math.Cos(radian_fushi));
            //构造一个新的向量
            var vector3 = new Vector3(vector.X, y, z);
            //通过平面旋转,将vector3,还原到世界坐标
            var vector3_ = Get平面还原Point(new PointF3D(vector3.X, vector3.Y, vector3.Z), new PointF3D(0, 0, 0));
            //对vector3_取反向量
            //,得到最终的向量
            return new PointF3D(vector3_.X, vector3_.Y, vector3_.Z);
            //float x = (float)(Math.Cos(radian) * (p.X - p0.X) - Math.Sin(radian) * (p.Y - p0.Y));
            //float y = (float)(Math.Sin(radian) * (p.X - p0.X) + Math.Cos(radian) * (p.Y - p0.Y));
            //float z = (float)(Math.Sin(radian_fushi) * (p.Y - p0.Y)); // æ·»åŠ ä¿¯è§†è§’åº¦çš„å½±å“
            //return new PointF3D(x / Zoom.X, y / Zoom.Y, z/Zoom.Z);
        }
        /// <summary>
        /// èŽ·å–ä¸–ç•ŒæŠ•å½±åæ ‡
        /// </summary>
@@ -848,12 +904,13 @@
        /// <returns></returns>
        private PointF WorldPointToMapPoint(PointF point, float z, PointF3D offset = null)
        {
            if (offset == null) offset = new PointF3D(0, 0, 0);
            point = new PointF(point.X + offset.X, point.Y + offset.Y);
            PointF3D point3d = new PointF3D(point.X + offset.X, point.Y + offset.Y, z + offset.Z);
            var pointR = Get平面旋转Point(point, MapCenter);
            var pointR = Get平面旋转Point(point3d, MapCenter);
            var pointT = Get俯视角旋转Point(pointR, z + offset.Z, MapCenter);
            var pointT = Get俯视角投影Point(pointR, MapCenter);
            //var n=new PointF((float)pointR.X - Z(z).X, (float)(pointR.Y - Z(z).Y));
            return pointT;
@@ -865,21 +922,21 @@
        }
        private PointF WorldPointToMapPoint(NodeViewModel junction, PointF3D offset = null)
        {
            PointF p;
            if (junction == null) return new PointF(0, 0);
            p = WorldPointToMapPoint(junction.Position, junction.Z, offset);
            var p = WorldPointToMapPoint(junction.Position, junction.Z, offset);
            return p;
        }
        private PointF CubeWorldPointToMapPoint(NodeViewModel junction, PointF3D offset = null)
        {
            PointF p;
            if (junction == null) return new PointF(0, 0);
            var point = junction.Position;
            var point = junction.Position3D;
            var z = junction.Z;
            if (offset == null) offset = new PointF3D(0, 0, 0);
            point = new PointF(point.X + offset.X, point.Y + offset.Y);
            var pointR = Get平面旋转Point(point, new PointF(0, 0));
            var pointT = Get俯视角旋转Point(pointR, z + offset.Z, new PointF(0, 0));
            point = new PointF3D(point.X + offset.X, point.Y + offset.Y, point.Z + offset.Z);
            var pointR = Get平面旋转Point(point, new PointF3D(0, 0, 0));
            var pointT = Get俯视角投影Point(pointR, new PointF3D(0, 0, 0));
            //var n=new PointF((float)pointR.X - Z(z).X, (float)(pointR.Y - Z(z).Y));
            return pointT;
        }
@@ -968,32 +1025,22 @@
        }
        private PointF MapPointToWorldPoint(PointF3D point)
        {
            return MapPointToWorldPoint(new PointF(point.X, point.Y), point.Z);
        }
        /// <summary>
        /// èŽ·å–åœ°å›¾æŠ•å½±åæ ‡
        /// </summary>
        /// <param name="point"></param>
        /// <param name="z"></param>
        /// <returns></returns>
        public PointF MapPointToWorldPoint(PointF point, float z = 0)
        public PointF3D MapPointToWorldPoint(PointF point, float z = 0)
        {
            var pointT = Get俯视角还原Point(point, z, MapCenter);
            var pointT = Get俯视角投影还原Point(new PointF3D(point.X, point.Y, z), MapCenter);
            pointT = Get平面还原Point(pointT, MapCenter);
            //var n=new PointF((float)pointR.X - Z(z).X, (float)(pointR.Y - Z(z).Y));
            return pointT;
        }
        private PointF GetMapPoint_还原(NodeViewModel junction)
        {
            PointF p;
            p = MapPointToWorldPoint(junction.Position, junction.Z);
            return p;
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs
@@ -102,6 +102,7 @@
        MouseState _mouseState = MouseState.无;
        private NodeViewModel _OperaNode = null;
        PointF _HookPoint = new PointF(-1, -1);
        public PointF mouseXY = new PointF(0, 0);
        PointF DragStartPos;
@@ -306,20 +307,21 @@
        
        private double Rotation0 = 0;
        [Browsable(false)]
        public PointF MapCenter
        public PointF3D MapCenter
        { 
            get 
            {
                return mapOption.Center;
            {
                if (mapOption?.Center == null) return new PointF3D(0, 0, 0);
                return mapOption.Center;
            } 
            set 
            {
                //将$"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}"通过CenterChanged传出
                CenterChanged?.Invoke(this, $"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}");
                mapOption.Center = value;
                mapOption.Center = value;
            } 
        }
        private PointF MapCenter0;
        private PointF3D MapCenter0;
        private bool is3Dview = false;
        double ä¿¯è§†è§’度_start = 90;
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.cs
@@ -47,12 +47,24 @@
            InitializeComponent();
            this.DoubleBuffered = true;
            MapCenter = PointF.Empty;
            MapCenter =new PointF3D(0, 0, 0);
            zoom = 1.0f;
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            BackColor = Color.Transparent;
        }
        public void SetDefaultView()
        {
            mapOption0 = mapOption.Copy();
            InitCenter();
            RotationF = 45;
            Rotation = -45;
            MapObjectExtensions.AddCommand(mapOption, "Map", mapOption0, mapOption);
            SetMapInvalidate();
        }
        public void SetEditMode(bool isEditMode)
        {
@@ -82,7 +94,7 @@
            this.Inited = true;
            this.Status = DrawingStatus.Ready;
            SetDefaultView();
            //TContainer TCCube = new TContainer();
            //TCCube.settings = new Settings();
            //TCCube.settings.network = new MapViewNetWork();
@@ -170,7 +182,7 @@
        public void Clear()
        {
            _Template = null;
            MapCenter = PointF.Empty;
            MapCenter = new PointF3D(0, 0, 0);
            zoom = 1.0f;
            Rotation = 0;
            RotationF = 90;
@@ -213,19 +225,21 @@
            //将RotationF.ToString("0")通过RotationFChanged传出
            RotationFChanged?.Invoke(this, RotationF.ToString("0"));
            SetDefaultView();
        }
        private void InitCenter()
        {
            //MapCenter
            var p = PointF.Empty;
            var p = new PointF3D(0, 0, 0);
            float x0 = 99999999999f, y0 = 99999999999f, x1 = -99999999999f, y1 = -99999999999f;
            foreach (NodeViewModel junction in _Nodes)
            {
                p.X += (float)junction.X;
                p.Y += (float)junction.Y;
                p.Z += (float)junction.Z;
                if (x0 > junction.X) x0 = junction.X;
                if (y0 > junction.Y) y0 = junction.Y;
                if (x1 < junction.X) x1 = junction.X;
@@ -246,6 +260,7 @@
            {
                p.X /= _Nodes.Count;
                p.Y /= _Nodes.Count;
                p.Z /= _Nodes.Count;
            }
            MapCenter = p;
        }
@@ -411,7 +426,8 @@
            {
                _mouseState = MouseState.无;
                DragStartPos = ScreenToMap(new PointF(e.X, e.Y));
                BackGroudPicLeftPos = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y)), _Template.BackGroundElev);
                var p3d = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y)), _Template.BackGroundElev);
                BackGroudPicLeftPos = new PointF(p3d.X, p3d.Y);
                _isSettingBackGroundPictur = true;
            }
            else if (e.Button == MouseButtons.Right)
@@ -424,6 +440,12 @@
                Cursor = Cursors.Hand;
                mapOption0 = mapOption.Copy();
                _isRotating = true;
                //如果有锚点
                if (hoveredObjs.Count > 0 && hoveredObjs[0] is NodeViewModel node)
                {
                    _OperaNode = node;
                    _HookPoint = MapToScreen(WorldPointToMapPoint(node));
                }
            }
        }
@@ -475,12 +497,12 @@
            }
            else if (_isPanning)
            {
                var vector = GetRotateVector(new PointF(e.X, e.Y), new PointF(_lastMouseX, _lastMouseY));
                MapCenter = new PointF(MapCenter.X - vector.X / Zoom.X, MapCenter.Y - vector.Y / Zoom.Y);
                var vector = GetWorldVectorByScreenPoints(new PointF(e.X, e.Y), new PointF(_lastMouseX, _lastMouseY));
                MapCenter = new PointF3D(MapCenter.X - vector.X, MapCenter.Y - vector.Y, MapCenter.Z - vector.Z);
                //将$"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}"通过CenterChanged传出
                CenterChanged?.Invoke(this, $"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")}");
                CenterChanged?.Invoke(this, $"{MapCenter.X.ToString("0.00")},{MapCenter.Y.ToString("0.00")},{MapCenter.Z.ToString("0.00")}");
                needInvalidate = true;
            }
@@ -630,7 +652,8 @@
            if /*设置背景*/(e.Button == MouseButtons.Left && _isSettingBackGroundPictur)
            {
                _Template.BackGroundPoint1 = BackGroudPicLeftPos;
                _Template.BackGroundPoint2 = MapPointToWorldPoint(mousePosition, _Template.BackGroundElev);
                var p3d = MapPointToWorldPoint(mousePosition, _Template.BackGroundElev);
                _Template.BackGroundPoint2 = new PointF(p3d.X, p3d.Y);
                _isSettingBackGroundPictur = false;
                mapOption.isShowPic = true;
@@ -874,6 +897,9 @@
                _isRotating = false;
                this.Cursor = _lastCursor;
                if (recordView) MapObjectExtensions.AddCommand(mapOption, "Map", mapOption0, mapOption);
                _OperaNode = null;
                _HookPoint = new PointF(-1, -1);
                MapCenter0 = MapCenter;
                mousePosition = new PointF(0, 0);
                //将Rotation.ToString("0")通过RotationChanged传出
@@ -887,7 +913,8 @@
            z = 0;
            if (RotationF != 0)
            {
                p = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y), z));
                var p3d = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y), z));
                p = new PointF(p3d.X, p3d.Y);
            }
            else
@@ -902,7 +929,8 @@
            z = j.Z;
            if (RotationF != 0)
            {
                p = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y), j.Z), j.Z);
                var p3d = MapPointToWorldPoint(ScreenToMap(new PointF(e.X, e.Y), j.Z), j.Z);
                p = new PointF(p3d.X, p3d.Y);
            }
            else
@@ -1682,10 +1710,11 @@
                position = obj.Position;
            PointF currentPos = MapToScreen(WorldPointToMapPoint(position, obj.Z));
            PointF centerScreen = new PointF(this.Width / 2, this.Height / 2);
            var vector = GetRotateVector(centerScreen, currentPos);
            MapCenter = new PointF(
            MapCenter.X - vector.X / Zoom.X,
            MapCenter.Y - vector.Y / Zoom.Y);
            var vector = GetWorldVectorByScreenPoints(centerScreen, currentPos);
            MapCenter = new PointF3D(
            MapCenter.X - vector.X,
            MapCenter.Y - vector.Y,
            MapCenter.Z - vector.Z);
        }
        bool ctrlPressed = false;
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/MapDimensions.cs
@@ -16,7 +16,7 @@
        [Category("视角")]
        [DisplayName("中心")]
        [Browsable(true)]
        public PointF Center { get; set; }
        public PointF3D Center { get; set; }
        [Category("视角")]
        [DisplayName("缩放")]
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Template/Settings.cs
@@ -212,7 +212,7 @@
            set
            {
                if (view == null) view = new MapDimensions();
                view.Center = new PointF(value, view.Center.Y);
                view.Center = new PointF3D(value, view.Center.Y,view.Center.Z);
            }
        }
        [Category("默认视角")]
@@ -228,7 +228,7 @@
            set
            {
                if (view == null) view = new MapDimensions();
                view.Center = new PointF(view.Center.X, value);
                view.Center = new PointF3D(view.Center.X, value, view.Center.Z);
            }
        }