Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/03-q3d/XhsProjectSimulationQ3dCtrl.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Draw.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.Model.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/Map/Drawer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Common/MapDimensions.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Template/Settings.cs | ●●●●● 补丁 | 查看 | 原始文档 | 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); } }