qyx 1 week ago
parent
commit
533a2762a9
29 changed files with 740 additions and 43 deletions
  1. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/.suo
  2. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/App.config
  3. 50
    11
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs
  4. 10
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj
  5. 4
    2
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InsertDOMs_to_one.cs
  6. 14
    14
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/MainClass.cs
  7. 2
    2
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Menus.cs
  8. 12
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.Designer.cs
  9. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.settings
  10. 110
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.Designer.cs
  11. 53
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.cs
  12. 120
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.resx
  13. 326
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeLine.cs
  14. 24
    12
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.Designer.cs
  15. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.cs
  16. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/Drawing4.dwg
  17. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/Drawing5.dwg
  18. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll
  19. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll.config
  20. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.pdb
  21. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  22. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  23. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.SlopeL.resources
  24. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.AssemblyReference.cache
  25. 1
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.CoreCompileInputs.cache
  26. 2
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.FileListAbsolute.txt
  27. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.GenerateResource.cache
  28. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.dll
  29. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.pdb

BIN
加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/.suo View File


+ 3
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/App.config View File

51
       <setting name="dgj" serializeAs="String">
51
       <setting name="dgj" serializeAs="String">
52
         <value>1</value>
52
         <value>1</value>
53
       </setting>
53
       </setting>
54
+      <setting name="FCY" serializeAs="String">
55
+        <value>复查员 </value>
56
+      </setting>
54
     </HCTools.Properties.Settings>
57
     </HCTools.Properties.Settings>
55
   </userSettings>
58
   </userSettings>
56
 </configuration>
59
 </configuration>

+ 50
- 11
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs View File

10
 using GrxCAD.EditorInput;
10
 using GrxCAD.EditorInput;
11
 using GrxCAD.Internal;
11
 using GrxCAD.Internal;
12
 using System.Windows.Forms;
12
 using System.Windows.Forms;
13
+using GrxCAD.Colors;
13
 
14
 
14
 namespace HCTools
15
 namespace HCTools
15
 {
16
 {
775
         }
776
         }
776
 
777
 
777
 
778
 
779
+        public void setlyrcolorindex(short index,string lyrname)
780
+        {
781
+            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
782
+            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
783
+            Transaction traction = database.TransactionManager.StartTransaction();
784
+            try
785
+            {
786
+                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
787
+                LayerTableRecord layer = traction.GetObject(layertable[lyrname],OpenMode.ForWrite) as LayerTableRecord;
788
+
789
+                // 设置颜色索引
790
+                layer.Color = Color.FromColorIndex(ColorMethod.ByAci, index);
791
+                traction.Commit();
792
+            }
793
+            catch (GrxCAD.Runtime.Exception)
794
+            {
795
+                traction.Abort();
796
+            }
797
+            finally
798
+            {
799
+                traction.Dispose();
800
+                doclock.Dispose();
801
+            }
802
+        }
803
+
778
 
804
 
779
         public void clear(string layername)
805
         public void clear(string layername)
780
         {
806
         {
943
                 {
969
                 {
944
                     colorgb col = new colorgb(255, 0, 0);
970
                     colorgb col = new colorgb(255, 0, 0);
945
                     layerscontrol.creatlayer(layername, col);
971
                     layerscontrol.creatlayer(layername, col);
972
+                    layerscontrol.setlyrcolorindex(1, layername);
946
                     layerscontrol.movelayertofront(layername);
973
                     layerscontrol.movelayertofront(layername);
947
                 }
974
                 }
948
                 else
975
                 else
1218
                 Outcoll.Add(new Point3d(LB.X - D22 - D1, LB.Y - D22 - D1, 0));
1245
                 Outcoll.Add(new Point3d(LB.X - D22 - D1, LB.Y - D22 - D1, 0));
1219
                 Outcoll.Add(new Point3d(RB.X + D22 + D1, RB.Y - D22 - D1, 0));
1246
                 Outcoll.Add(new Point3d(RB.X + D22 + D1, RB.Y - D22 - D1, 0));
1220
                 Outcoll.Add(new Point3d(RT.X + D22 + D1, RT.Y + D22 + D1, 0));
1247
                 Outcoll.Add(new Point3d(RT.X + D22 + D1, RT.Y + D22 + D1, 0));
1221
-                Outcoll.Add(new Point3d(LT.X - D22 - D1, LT.Y + D22 + D1, 0));
1248
+                //Outcoll.Add(new Point3d(LT.X - D22 - D1, LT.Y + D22 + D1, 0));
1222
 
1249
 
1223
                 Polyline2d line = new Polyline2d(Poly2dType.SimplePoly, Outcoll, 0, true, D2, D2, null);
1250
                 Polyline2d line = new Polyline2d(Poly2dType.SimplePoly, Outcoll, 0, true, D2, D2, null);
1224
             
1251
             
1225
                 line.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1252
                 line.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1253
+            line.ColorIndex = 1;
1226
                 line.Layer = layername;
1254
                 line.Layer = layername;
1255
+                line.Closed = true;
1227
 
1256
 
1228
                 line.SetDatabaseDefaults();
1257
                 line.SetDatabaseDefaults();
1229
                 blocktablerecord.AppendEntity(line);
1258
                 blocktablerecord.AppendEntity(line);
1364
                 str = TKInfo.CTY;
1393
                 str = TKInfo.CTY;
1365
                 RLnote.Add(str);
1394
                 RLnote.Add(str);
1366
             }
1395
             }
1367
-                if (string.IsNullOrEmpty(TKInfo.TDY) == false)
1368
-                {
1369
-                    str = TKInfo.TDY;
1370
-                    RLnote.Add(str);
1371
-                }
1396
+            if (string.IsNullOrEmpty(TKInfo.TDY) == false)
1397
+            {
1398
+                str = TKInfo.TDY;
1399
+                RLnote.Add(str);
1400
+            }
1372
             if (string.IsNullOrEmpty(TKInfo.SHY) == false)
1401
             if (string.IsNullOrEmpty(TKInfo.SHY) == false)
1373
             {
1402
             {
1374
                 str = TKInfo.SHY;
1403
                 str = TKInfo.SHY;
1379
                 str = TKInfo.JCY;
1408
                 str = TKInfo.JCY;
1380
                 RLnote.Add(str);
1409
                 RLnote.Add(str);
1381
             }
1410
             }
1382
-                str = "复查员 ";
1411
+            if (string.IsNullOrEmpty(TKInfo.FCY) == false)
1412
+            {
1413
+                str = TKInfo.FCY;
1383
                 RLnote.Add(str);
1414
                 RLnote.Add(str);
1415
+            }
1384
             //秘密等级
1416
             //秘密等级
1385
             if (string.IsNullOrEmpty(TKInfo.Secret) == false)
1417
             if (string.IsNullOrEmpty(TKInfo.Secret) == false)
1386
             {
1418
             {
1469
                 DBText text4_tm = new DBText();
1501
                 DBText text4_tm = new DBText();
1470
                 text4_tm.TextString = TKInfo.name;
1502
                 text4_tm.TextString = TKInfo.name;
1471
                 text4_tm.Position = new Point3d(xx, yy, 0);
1503
                 text4_tm.Position = new Point3d(xx, yy, 0);
1472
-                text4_tm.Height = D10;
1504
+                text4_tm.Height = D12;
1473
                 text4_tm.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 6);
1505
                 text4_tm.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 6);
1474
                 text4_tm.Layer = layername;
1506
                 text4_tm.Layer = layername;
1475
                 text4_tm.HorizontalMode = TextHorizontalMode.TextCenter;
1507
                 text4_tm.HorizontalMode = TextHorizontalMode.TextCenter;
2496
             Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
2528
             Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
2497
             Database database = HostApplicationServices.WorkingDatabase;
2529
             Database database = HostApplicationServices.WorkingDatabase;
2498
             Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2530
             Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2531
+
2532
+            ViewTableRecord currview = editor.GetCurrentView();
2533
+            currview.CenterPoint = new Point2d(0, 0);
2534
+            currview.ViewDirection = new Vector3d(0, 0, 1);
2535
+            currview.Width = 2;
2536
+            currview.Height = 2;
2537
+            editor.SetCurrentView(currview);
2538
+
2499
             using (Transaction traction = database.TransactionManager.StartTransaction())
2539
             using (Transaction traction = database.TransactionManager.StartTransaction())
2500
             {
2540
             {
2501
 
2541
 
2502
                 //删除坐标原点多段线
2542
                 //删除坐标原点多段线
2503
                 Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2543
                 Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2504
-                Point3d pt1 = new Point3d(-1, 1, 0);
2505
-                Point3d pt2 = new Point3d(0, 0, 0);
2544
+                Point3d pt1 = new Point3d(-1, -1, 0);
2545
+                Point3d pt2 = new Point3d(1, 1, 0);
2506
                 PromptSelectionResult psr = ed.SelectCrossingWindow(pt1, pt2);
2546
                 PromptSelectionResult psr = ed.SelectCrossingWindow(pt1, pt2);
2507
                 if (psr.Status == PromptStatus.OK)
2547
                 if (psr.Status == PromptStatus.OK)
2508
                 {
2548
                 {
2515
                     }
2555
                     }
2516
                 }
2556
                 }
2517
 
2557
 
2518
-                ViewTableRecord currview = editor.GetCurrentView();
2519
                 currview.CenterPoint = new Point2d((RT.X - LT.X) / 2 + LT.X, (LT.Y - LB.Y) / 2 + LB.Y);
2558
                 currview.CenterPoint = new Point2d((RT.X - LT.X) / 2 + LT.X, (LT.Y - LB.Y) / 2 + LB.Y);
2520
                 currview.ViewDirection = new Vector3d(0, 0, 1);
2559
                 currview.ViewDirection = new Vector3d(0, 0, 1);
2521
                 currview.Width = RT.X - LT.X + TKInfo.BLC / 10;
2560
                 currview.Width = RT.X - LT.X + TKInfo.BLC / 10;

+ 10
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj View File

381
     <Compile Include="Scale.Designer.cs">
381
     <Compile Include="Scale.Designer.cs">
382
       <DependentUpon>Scale.cs</DependentUpon>
382
       <DependentUpon>Scale.cs</DependentUpon>
383
     </Compile>
383
     </Compile>
384
+    <Compile Include="SlopeL.cs">
385
+      <SubType>Form</SubType>
386
+    </Compile>
387
+    <Compile Include="SlopeL.Designer.cs">
388
+      <DependentUpon>SlopeL.cs</DependentUpon>
389
+    </Compile>
390
+    <Compile Include="SlopeLine.cs" />
384
     <Compile Include="TKInfo.cs">
391
     <Compile Include="TKInfo.cs">
385
       <SubType>Form</SubType>
392
       <SubType>Form</SubType>
386
     </Compile>
393
     </Compile>
466
     <EmbeddedResource Include="Scale.resx">
473
     <EmbeddedResource Include="Scale.resx">
467
       <DependentUpon>Scale.cs</DependentUpon>
474
       <DependentUpon>Scale.cs</DependentUpon>
468
     </EmbeddedResource>
475
     </EmbeddedResource>
476
+    <EmbeddedResource Include="SlopeL.resx">
477
+      <DependentUpon>SlopeL.cs</DependentUpon>
478
+    </EmbeddedResource>
469
     <EmbeddedResource Include="TKInfo.resx">
479
     <EmbeddedResource Include="TKInfo.resx">
470
       <DependentUpon>TKInfo.cs</DependentUpon>
480
       <DependentUpon>TKInfo.cs</DependentUpon>
471
     </EmbeddedResource>
481
     </EmbeddedResource>

+ 4
- 2
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InsertDOMs_to_one.cs View File

92
                     {
92
                     {
93
                         string fileName = checkedListBox_dom.Items[i].ToString();
93
                         string fileName = checkedListBox_dom.Items[i].ToString();
94
                         string tifpath = textBox_dom.Text + "//" + fileName;
94
                         string tifpath = textBox_dom.Text + "//" + fileName;
95
-                        string tfwpath = tifpath.Replace(".tif", ".tfw");
95
+                        string tfwpath = tifpath.Replace(".tif", ".tfw").Replace(".Tif", ".tfw");
96
                         InsertDOMs(tifpath, tfwpath, doc);
96
                         InsertDOMs(tifpath, tfwpath, doc);
97
                     }
97
                     }
98
                 }
98
                 }
99
+
99
                 //浩辰2020不能用doc.CloseandSave,它只能close不save
100
                 //浩辰2020不能用doc.CloseandSave,它只能close不save
100
                 doc.Database.Save();
101
                 doc.Database.Save();
101
                 doc.CloseAndDiscard();
102
                 doc.CloseAndDiscard();
112
             try
113
             try
113
             {
114
             {
114
                 StreamReader sr = new StreamReader(tfwfilename);
115
                 StreamReader sr = new StreamReader(tfwfilename);
115
-                scale = Convert.ToDouble(sr.ReadLine());
116
+                string firstLine = sr.ReadLine()?.Trim();
117
+                scale = Convert.ToDouble(firstLine);
116
                 sr.ReadLine();
118
                 sr.ReadLine();
117
                 sr.ReadLine();
119
                 sr.ReadLine();
118
                 sr.ReadLine();
120
                 sr.ReadLine();

+ 14
- 14
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/MainClass.cs View File

445
         //    //}
445
         //    //}
446
         //}
446
         //}
447
 
447
 
448
-        ////示坡线
449
-        //[CommandMethod("SlopeLine")]
450
-        //public void SlpLine()
451
-        //{
452
-        //    //Verify();
453
-        //    //if (num == 1)
454
-        //    //{
455
-        //        SlopeL sl = new SlopeL();
456
-        //        sl.Show();
457
-        //        //Flag = "SlopeLine";
458
-        //        //Parameters SL = new Parameters();
459
-        //        //SL.Show();
460
-        //    //}
461
-        //}
448
+        //示坡线
449
+        [CommandMethod("SlopeLine")]
450
+        public void SlpLine()
451
+        {
452
+            //Verify();
453
+            //if (num == 1)
454
+            //{
455
+            SlopeL sl = new SlopeL();
456
+            sl.Show();
457
+            //Flag = "SlopeLine";
458
+            //Parameters SL = new Parameters();
459
+            //SL.Show();
460
+            //}
461
+        }
462
         #endregion
462
         #endregion
463
 
463
 
464
         //批量插入DOM
464
         //批量插入DOM

+ 2
- 2
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Menus.cs View File

127
             pmi = pm.AddMenuItem(pm.Count + 1, "计曲线高程标注", "JQXLabel ");
127
             pmi = pm.AddMenuItem(pm.Count + 1, "计曲线高程标注", "JQXLabel ");
128
             pmi.HelpString = "计曲线高程标注";
128
             pmi.HelpString = "计曲线高程标注";
129
 
129
 
130
-            //pmi = pm.AddMenuItem(pm.Count + 1, "示坡线绘制", "SlopeLine ");
131
-            //pmi.HelpString = "示坡线绘制";
130
+            pmi = pm.AddMenuItem(pm.Count + 1, "示坡线绘制", "SlopeLine ");
131
+            pmi.HelpString = "示坡线绘制";
132
 
132
 
133
             //添加一个分隔条以区分不同类型的命令
133
             //添加一个分隔条以区分不同类型的命令
134
             pm.AddSeparator(pm.Count + 1);
134
             pm.AddSeparator(pm.Count + 1);

+ 12
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.Designer.cs View File

143
                 this["dgj"] = value;
143
                 this["dgj"] = value;
144
             }
144
             }
145
         }
145
         }
146
+        
147
+        [global::System.Configuration.UserScopedSettingAttribute()]
148
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149
+        [global::System.Configuration.DefaultSettingValueAttribute("复查员 ")]
150
+        public string FCY {
151
+            get {
152
+                return ((string)(this["FCY"]));
153
+            }
154
+            set {
155
+                this["FCY"] = value;
156
+            }
157
+        }
146
     }
158
     }
147
 }
159
 }

+ 3
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.settings View File

35
     <Setting Name="dgj" Type="System.Double" Scope="User">
35
     <Setting Name="dgj" Type="System.Double" Scope="User">
36
       <Value Profile="(Default)">1</Value>
36
       <Value Profile="(Default)">1</Value>
37
     </Setting>
37
     </Setting>
38
+    <Setting Name="FCY" Type="System.String" Scope="User">
39
+      <Value Profile="(Default)">复查员 </Value>
40
+    </Setting>
38
   </Settings>
41
   </Settings>
39
 </SettingsFile>
42
 </SettingsFile>

+ 110
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.Designer.cs View File

1
+
2
+namespace HCTools
3
+{
4
+    partial class SlopeL
5
+    {
6
+        /// <summary>
7
+        /// Required designer variable.
8
+        /// </summary>
9
+        private System.ComponentModel.IContainer components = null;
10
+
11
+        /// <summary>
12
+        /// Clean up any resources being used.
13
+        /// </summary>
14
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
+        protected override void Dispose(bool disposing)
16
+        {
17
+            if (disposing && (components != null))
18
+            {
19
+                components.Dispose();
20
+            }
21
+            base.Dispose(disposing);
22
+        }
23
+
24
+        #region Windows Form Designer generated code
25
+
26
+        /// <summary>
27
+        /// Required method for Designer support - do not modify
28
+        /// the contents of this method with the code editor.
29
+        /// </summary>
30
+        private void InitializeComponent()
31
+        {
32
+            this.comboBox_tip_blc = new System.Windows.Forms.ComboBox();
33
+            this.label_tip_blc = new System.Windows.Forms.Label();
34
+            this.btn_No = new System.Windows.Forms.Button();
35
+            this.btn_Yes = new System.Windows.Forms.Button();
36
+            this.Tip = new System.Windows.Forms.Label();
37
+            this.SuspendLayout();
38
+            // 
39
+            // comboBox_tip_blc
40
+            // 
41
+            this.comboBox_tip_blc.FormattingEnabled = true;
42
+            this.comboBox_tip_blc.Location = new System.Drawing.Point(190, 24);
43
+            this.comboBox_tip_blc.Name = "comboBox_tip_blc";
44
+            this.comboBox_tip_blc.Size = new System.Drawing.Size(169, 23);
45
+            this.comboBox_tip_blc.TabIndex = 9;
46
+            // 
47
+            // label_tip_blc
48
+            // 
49
+            this.label_tip_blc.AutoSize = true;
50
+            this.label_tip_blc.Location = new System.Drawing.Point(87, 32);
51
+            this.label_tip_blc.Name = "label_tip_blc";
52
+            this.label_tip_blc.Size = new System.Drawing.Size(82, 15);
53
+            this.label_tip_blc.TabIndex = 8;
54
+            this.label_tip_blc.Text = "比例尺选择";
55
+            // 
56
+            // btn_No
57
+            // 
58
+            this.btn_No.Location = new System.Drawing.Point(297, 211);
59
+            this.btn_No.Name = "btn_No";
60
+            this.btn_No.Size = new System.Drawing.Size(75, 31);
61
+            this.btn_No.TabIndex = 7;
62
+            this.btn_No.Text = "否";
63
+            this.btn_No.UseVisualStyleBackColor = true;
64
+            this.btn_No.Click += new System.EventHandler(this.btn_No_Click);
65
+            // 
66
+            // btn_Yes
67
+            // 
68
+            this.btn_Yes.Location = new System.Drawing.Point(81, 211);
69
+            this.btn_Yes.Name = "btn_Yes";
70
+            this.btn_Yes.Size = new System.Drawing.Size(75, 31);
71
+            this.btn_Yes.TabIndex = 6;
72
+            this.btn_Yes.Text = "是";
73
+            this.btn_Yes.UseVisualStyleBackColor = true;
74
+            this.btn_Yes.Click += new System.EventHandler(this.btn_Yes_Click);
75
+            // 
76
+            // Tip
77
+            // 
78
+            this.Tip.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
79
+            this.Tip.Location = new System.Drawing.Point(68, 70);
80
+            this.Tip.Name = "Tip";
81
+            this.Tip.Size = new System.Drawing.Size(317, 112);
82
+            this.Tip.TabIndex = 5;
83
+            // 
84
+            // SlopeL
85
+            // 
86
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
87
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
88
+            this.ClientSize = new System.Drawing.Size(466, 273);
89
+            this.Controls.Add(this.comboBox_tip_blc);
90
+            this.Controls.Add(this.label_tip_blc);
91
+            this.Controls.Add(this.btn_No);
92
+            this.Controls.Add(this.btn_Yes);
93
+            this.Controls.Add(this.Tip);
94
+            this.Name = "SlopeL";
95
+            this.Text = "示坡线绘制";
96
+            this.Load += new System.EventHandler(this.SlopeL_Load);
97
+            this.ResumeLayout(false);
98
+            this.PerformLayout();
99
+
100
+        }
101
+
102
+        #endregion
103
+
104
+        private System.Windows.Forms.ComboBox comboBox_tip_blc;
105
+        private System.Windows.Forms.Label label_tip_blc;
106
+        private System.Windows.Forms.Button btn_No;
107
+        private System.Windows.Forms.Button btn_Yes;
108
+        private System.Windows.Forms.Label Tip;
109
+    }
110
+}

+ 53
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.cs View File

1
+using System;
2
+using System.Collections.Generic;
3
+using System.ComponentModel;
4
+using System.Data;
5
+using System.Drawing;
6
+using System.Linq;
7
+using System.Text;
8
+using System.Threading.Tasks;
9
+using System.Windows.Forms;
10
+
11
+namespace HCTools
12
+{
13
+    public partial class SlopeL : Form
14
+    {
15
+        public SlopeL()
16
+        {
17
+            InitializeComponent();
18
+        }
19
+
20
+        private void SlopeL_Load(object sender, EventArgs e)
21
+        {
22
+            this.comboBox_tip_blc.DropDownStyle = ComboBoxStyle.DropDownList;
23
+            this.comboBox_tip_blc.Items.AddRange(new object[] {
24
+            "1:500",
25
+            "1:1000",
26
+            "1:2000",
27
+            "1:5000"});
28
+        }
29
+
30
+        private void btn_Yes_Click(object sender, EventArgs e)
31
+        {
32
+        }
33
+
34
+        private void btn_No_Click(object sender, EventArgs e)
35
+        {
36
+            if (comboBox_tip_blc.Text == "")
37
+            {
38
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
39
+                return;
40
+            }
41
+
42
+            //比例尺
43
+            string blctext = comboBox_tip_blc.Text;
44
+            int blcindex = blctext.LastIndexOf(':');
45
+            string strblc = blctext.Substring(blcindex + 1);
46
+            SlopeLine.blc = Convert.ToInt32(strblc);
47
+
48
+            this.Close();
49
+            SlopeLine slpl = new SlopeLine();
50
+            slpl.slopeline();
51
+        }
52
+    }
53
+}

+ 120
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeL.resx View File

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+</root>

+ 326
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/SlopeLine.cs View File

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+using GrxCAD.ApplicationServices;
8
+using GrxCAD.DatabaseServices;
9
+using GrxCAD.EditorInput;
10
+using GrxCAD.Geometry;
11
+
12
+namespace HCTools
13
+{
14
+    class SlopeLine
15
+    {
16
+        public static int blc;
17
+        public struct ContourElevation
18
+        {
19
+            public double elevation;
20
+            public double length;
21
+            public ObjectId objID;
22
+        }
23
+        ObjectIdCollection idcoll = new ObjectIdCollection();
24
+
25
+        public void slopeline()
26
+        {
27
+            Document doc = Application.DocumentManager.MdiActiveDocument;
28
+            Database db = doc.Database;
29
+            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
30
+
31
+            TypedValue[] value = new TypedValue[]
32
+                {
33
+                    new TypedValue((int)DxfCode.Start,"LWPOLYLINE"),
34
+                    new TypedValue((int)DxfCode.LayerName,"8110,8120")
35
+                };//设置筛选条件
36
+            SelectionFilter filter = new SelectionFilter(value);
37
+            //选择区域中全部对象
38
+            //PromptSelectionResult psr = ed.SelectAll(filter);
39
+            // 要求在图形区域中手动选择对象
40
+            PromptSelectionResult psr = ed.GetSelection(filter);
41
+
42
+            if (psr.Status == PromptStatus.OK)
43
+            {
44
+                SelectionSet ss = psr.Value;
45
+                ObjectId[] ids = new ObjectId[ss.Count];
46
+                ids = ss.GetObjectIds();
47
+                foreach (ObjectId id in ids)
48
+                {
49
+                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
50
+                    using (Transaction trans = db.TransactionManager.StartTransaction())
51
+                    {
52
+                        Polyline pll = trans.GetObject(id, OpenMode.ForRead) as Polyline;
53
+                       
54
+                        if (pll.StartPoint == pll.EndPoint || pll.Closed == true)
55
+                        {
56
+                            searchslpline(pll,trans);
57
+                        }
58
+                        trans.Commit();
59
+                    }
60
+                    doclock.Dispose();
61
+                }
62
+            }
63
+        }
64
+
65
+        /// <summary>
66
+        /// 搜索闭合等高线并画出示坡线
67
+        /// </summary>
68
+        private void searchslpline(Polyline pll, Transaction trans)
69
+        {
70
+            if (idcoll.Contains(pll.Id))
71
+                return;
72
+
73
+            Point3dCollection ptcoll = new Point3dCollection();
74
+            Point3dCollection ptcoll2 = new Point3dCollection();
75
+            int windowwidth = 30 * 5 * blc / 1000;//当前可视范围
76
+            int windowheight = 30 * 5 * blc / 1000;
77
+
78
+            Extents3d extents = pll.GeometricExtents;
79
+            Point3d center = extents.MinPoint + (extents.MaxPoint - extents.MinPoint) / 2.0;//计算几何中心
80
+
81
+            Matrix3d mt1 = Matrix3d.Scaling(2, center);
82
+            pll = trans.GetObject(pll.Id,OpenMode.ForWrite)as Polyline;
83
+            pll.TransformBy(mt1);
84
+            pll.GetStretchPoints(ptcoll);//将闭合等高线缩放至原来的两倍大并获取其节点用于之后的筛选
85
+            Matrix3d mt2 = Matrix3d.Scaling(0.5, center);
86
+            pll.TransformBy(mt2);//还原闭合等高线
87
+           
88
+
89
+            //获取闭合等高线的节点并搜索其内是否还有闭合等高线,若有,则选择最里面的闭合等高线画示坡线
90
+            pll.GetStretchPoints(ptcoll2);
91
+            
92
+            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
93
+
94
+            TypedValue[] value = new TypedValue[]
95
+                {
96
+                    new TypedValue((int)DxfCode.Start,"LWPOLYLINE"),
97
+                    new TypedValue((int)DxfCode.LayerName,"8110,8120")
98
+                };//设置筛选条件
99
+            SelectionFilter filter = new SelectionFilter(value);
100
+
101
+
102
+            ViewTableRecord currview = ed.GetCurrentView();
103
+            currview.CenterPoint = new Point2d(pll.StartPoint.X, pll.StartPoint.Y);
104
+            currview.ViewDirection = new Vector3d(0, 0, 1);
105
+            currview.Width = windowwidth;
106
+            currview.Height = windowheight;
107
+            ed.SetCurrentView(currview);
108
+
109
+            PromptSelectionResult psr1 = ed.SelectWindowPolygon(ptcoll2, filter);
110
+            if (psr1.Status == PromptStatus.OK && psr1.Value.Count > 0)
111
+            {
112
+                SelectionSet selects = psr1.Value;
113
+                ObjectId[] idss = selects.GetObjectIds();
114
+
115
+                List<ContourElevation> Contourcollect = new List<ContourElevation>();
116
+                ContourElevation self = new ContourElevation();
117
+                self.length = pll.Length;
118
+                self.objID = pll.Id;
119
+                Contourcollect.Add(self);
120
+                for (int ii = 0; ii < idss.Length; ii++)
121
+                {
122
+                    Polyline pllselected = trans.GetObject(idss[ii], OpenMode.ForRead) as Polyline;
123
+                    ContourElevation cl = new ContourElevation();
124
+                    cl.length = pllselected.Length;
125
+                    cl.objID = pllselected.Id;
126
+                    Contourcollect.Add(cl);
127
+                }
128
+                List<ContourElevation> sorted = Contourcollect.OrderBy(s => s.length).ToList();//length 从小到大
129
+                pll = trans.GetObject(sorted[0].objID, OpenMode.ForWrite) as Polyline;
130
+                while (pll.Closed == false && pll.StartPoint != pll.EndPoint)//判断最短的等高线是否闭合
131
+                {
132
+                    sorted.RemoveAt(0);
133
+                    pll = trans.GetObject(sorted[0].objID, OpenMode.ForWrite) as Polyline;
134
+                }
135
+                if (idcoll.Contains(pll.Id))
136
+                    return;
137
+            }
138
+
139
+           
140
+            //通过之前得到的增大两倍后的闭合等高线节点进行窗交,获取周围等高线,根据此闭合等高线和
141
+            //周围等高线的大小关系决定示坡线的方向
142
+            PromptSelectionResult psr2 = ed.SelectCrossingPolygon(ptcoll, filter);
143
+            if (psr2.Status == PromptStatus.OK)
144
+            {
145
+                SelectionSet ss = psr2.Value;
146
+                ObjectId[] ids = ss.GetObjectIds();
147
+                List<ContourElevation> Contour = new List<ContourElevation>();
148
+                for (int ii = 0; ii < ids.Length; ii++)
149
+                {
150
+                    Polyline pllselected = trans.GetObject(ids[ii], OpenMode.ForRead) as Polyline;
151
+                    //if (pllselected.Closed == true || pllselected.StartPoint == pllselected.EndPoint && 
152
+                    //    pllselected.Id != pll.Id)
153
+                    //    continue;
154
+                    ContourElevation ce = new ContourElevation();
155
+                    ce.elevation = pllselected.Elevation;
156
+                    ce.objID = pllselected.Id;
157
+                    Contour.Add(ce);
158
+                }
159
+                List<ContourElevation> sorted = Contour.OrderBy(s => s.elevation).ToList();//elevation 从小到大
160
+                if (sorted[Contour.Count - 1].elevation == pll.Elevation)
161
+                {
162
+                    int j = 1;
163
+                    drawslpline(pll, j, trans);
164
+                    idcoll.Add(pll.Id);
165
+                }
166
+                if (sorted[0].elevation == pll.Elevation)
167
+                {
168
+                    int j = -1;
169
+                    drawslpline(pll, j, trans);
170
+                    idcoll.Add(pll.Id);
171
+                }
172
+            }
173
+        }
174
+
175
+        /// <summary>
176
+        /// 画示坡线
177
+        /// </summary>
178
+        private void drawslpline(Polyline pll, double i, Transaction trans)
179
+        {
180
+            Document doc = Application.DocumentManager.MdiActiveDocument;
181
+            Database db = doc.Database;
182
+            BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
183
+            BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
184
+                OpenMode.ForWrite) as BlockTableRecord;
185
+
186
+            //创建标注相交点符号的图层
187
+            LayerControl layerscontrol = new LayerControl();
188
+            string layname = "8200";
189
+            if (!layerscontrol.haslayername(layname))
190
+            {
191
+                colorgb col = new colorgb(0, 255, 0);
192
+                layerscontrol.creatlayer(layname, col);
193
+                layerscontrol.movelayertofront(layname);
194
+            }
195
+            else
196
+                layerscontrol.movelayertofront(layname);
197
+
198
+
199
+            //此等高线高程最高
200
+            if (i == 1)
201
+            {
202
+                //由于IntersectWith()函数在离原点太远的位置会有误差,所以将需要判断的闭合等高线移动到原点附近
203
+                Point3d tagpt = pll.StartPoint;//移动目标点
204
+                Point3dCollection ptss = new Point3dCollection();
205
+                pll.GetStretchPoints(ptss);
206
+                Vector3d acVec3d = pll.StartPoint.GetVectorTo(new Point3d(0, 0, 0));
207
+                pll.TransformBy(Matrix3d.Displacement(acVec3d));
208
+
209
+                //获取几何中心
210
+                Extents3d extents = pll.GeometricExtents;
211
+                Point3d center = extents.MinPoint + (extents.MaxPoint - extents.MinPoint) / 2.0;
212
+                Point3dCollection ptcoll = new Point3dCollection();
213
+
214
+
215
+                //由几何中心到闭合等高线的起点画一条示坡线,将其以几何中心作为基点延长
216
+                Line slpline = new Line(center, pll.StartPoint);
217
+                blocktablerecord.AppendEntity(slpline);
218
+                trans.AddNewlyCreatedDBObject(slpline, true);
219
+                slpline = trans.GetObject(slpline.Id,OpenMode.ForWrite)as Line;
220
+                Matrix3d mt1 = Matrix3d.Scaling(1.5, center);
221
+                slpline.TransformBy(mt1);
222
+
223
+                //获取示坡线与闭合等高线的交点,将示坡线由此打断,删除闭合等高线内的部分
224
+                slpline.IntersectWith(pll, Intersect.OnBothOperands, ptcoll, IntPtr.Zero, IntPtr.Zero);
225
+                Point3d pt1 = ptcoll[0];
226
+                Point3d pt2 = ptcoll[1];
227
+                DBObjectCollection objcoll= slpline.GetSplitCurves(ptcoll);
228
+                slpline.Erase();
229
+                foreach (Entity ent in objcoll)
230
+                {
231
+                    Line plline = ent as Line;
232
+                    if (plline.StartPoint != pll.StartPoint)
233
+                    {
234
+                        blocktablerecord.AppendEntity(plline);
235
+                        trans.AddNewlyCreatedDBObject(plline, true);
236
+                        objcoll.Remove(plline);
237
+                        plline.Erase();
238
+                    }
239
+                }
240
+                Line slpline1 = objcoll[0] as Line;
241
+                slpline1.Layer = "8200";
242
+                blocktablerecord.AppendEntity(slpline1);
243
+                trans.AddNewlyCreatedDBObject(slpline1, true);
244
+
245
+
246
+
247
+
248
+                Point3dCollection pts = new Point3dCollection();
249
+                pll.GetStretchPoints(pts);//获取当前闭合等高线节点
250
+
251
+                //由闭合等高线的几何中心和中间节点创建另一条示坡线,以几何中心作为基点延长
252
+                Line slpline2 = new Line(center, pts[pts.Count / 2 - 1]);
253
+                blocktablerecord.AppendEntity(slpline2);
254
+                trans.AddNewlyCreatedDBObject(slpline2, true);
255
+                slpline2 = trans.GetObject(slpline2.Id, OpenMode.ForWrite) as Line;
256
+                Matrix3d mt2 = Matrix3d.Scaling(1.5, center);
257
+                slpline2.TransformBy(mt2);
258
+
259
+                ptcoll.Clear();
260
+                //获取示坡线与闭合等高线的交点,将示坡线由此打断,删除闭合等高线内的部分
261
+                slpline2.IntersectWith(pll, Intersect.OnBothOperands, ptcoll, IntPtr.Zero, IntPtr.Zero);
262
+                DBObjectCollection objcoll1 = slpline2.GetSplitCurves(ptcoll);
263
+                slpline2.Erase();
264
+                foreach (Entity ent in objcoll1)
265
+                {
266
+                    Line plline = ent as Line;
267
+                    if (plline.StartPoint != pts[pts.Count / 2 - 1])
268
+                    {
269
+                        blocktablerecord.AppendEntity(plline);
270
+                        trans.AddNewlyCreatedDBObject(plline, true);
271
+                        objcoll1.Remove(plline);
272
+                        plline.Erase();
273
+                    }
274
+                }
275
+                Line slpline3 = objcoll1[0] as Line;
276
+                slpline3.Layer = "8200";
277
+                blocktablerecord.AppendEntity(slpline3);
278
+                trans.AddNewlyCreatedDBObject(slpline3, true);
279
+
280
+                //将闭合等高线和示坡线移回原来的位置
281
+                Vector3d target1 = pll.StartPoint.GetVectorTo(tagpt);
282
+                pll.TransformBy(Matrix3d.Displacement(target1));
283
+
284
+                slpline1 = trans.GetObject(slpline1.Id, OpenMode.ForWrite) as Line;
285
+                Vector3d target2 = slpline1.StartPoint.GetVectorTo(tagpt);
286
+                slpline1.TransformBy(Matrix3d.Displacement(target2));
287
+
288
+                slpline3 = trans.GetObject(slpline3.Id, OpenMode.ForWrite) as Line;
289
+                Vector3d target3 = slpline3.StartPoint.GetVectorTo(ptss[ptss.Count / 2 - 1]);
290
+                slpline3.TransformBy(Matrix3d.Displacement(target3));
291
+
292
+            }
293
+
294
+
295
+            //此等高线高程最低
296
+            if (i == -1)
297
+            {
298
+                //获取几何中心
299
+                Extents3d extents = pll.GeometricExtents;
300
+                Point3d center = extents.MinPoint + (extents.MaxPoint - extents.MinPoint) / 2.0;
301
+                Point3dCollection ptcoll = new Point3dCollection();
302
+
303
+                //由几何中心到闭合等高线的起点画一条示坡线,将其以闭合等高线的起点作为基点缩短
304
+                Line slpline = new Line(center, pll.StartPoint);
305
+                blocktablerecord.AppendEntity(slpline);
306
+                trans.AddNewlyCreatedDBObject(slpline, true);
307
+                slpline = trans.GetObject(slpline.Id, OpenMode.ForWrite) as Line;
308
+                Matrix3d mt1 = Matrix3d.Scaling(0.5, pll.StartPoint);
309
+                slpline.TransformBy(mt1);
310
+                slpline.Layer = "8200";
311
+
312
+
313
+                //由闭合等高线的几何中心和中间节点创建另一条示坡线,以中间节点作为基点缩短
314
+                Point3dCollection pts = new Point3dCollection();
315
+                pll.GetStretchPoints(pts);
316
+                Line slpline1 = new Line(center, pts[pts.Count / 2 - 1]);
317
+                blocktablerecord.AppendEntity(slpline1);
318
+                trans.AddNewlyCreatedDBObject(slpline1, true);
319
+                slpline1 = trans.GetObject(slpline1.Id, OpenMode.ForWrite) as Line;
320
+                Matrix3d mt2 = Matrix3d.Scaling(0.5, pts[pts.Count / 2 - 1]);
321
+                slpline1.TransformBy(mt2);
322
+                slpline1.Layer = "8200";
323
+            }
324
+        }
325
+    }
326
+}

+ 24
- 12
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.Designer.cs View File

48
             this.label_DH = new System.Windows.Forms.Label();
48
             this.label_DH = new System.Windows.Forms.Label();
49
             this.label2 = new System.Windows.Forms.Label();
49
             this.label2 = new System.Windows.Forms.Label();
50
             this.textBox_secret = new System.Windows.Forms.TextBox();
50
             this.textBox_secret = new System.Windows.Forms.TextBox();
51
+            this.textBox_FCY = new System.Windows.Forms.TextBox();
51
             this.SuspendLayout();
52
             this.SuspendLayout();
52
             // 
53
             // 
53
             // label_blc_TK
54
             // label_blc_TK
54
             // 
55
             // 
55
             this.label_blc_TK.AutoSize = true;
56
             this.label_blc_TK.AutoSize = true;
56
-            this.label_blc_TK.Location = new System.Drawing.Point(306, 304);
57
+            this.label_blc_TK.Location = new System.Drawing.Point(304, 335);
57
             this.label_blc_TK.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
58
             this.label_blc_TK.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
58
             this.label_blc_TK.Name = "label_blc_TK";
59
             this.label_blc_TK.Name = "label_blc_TK";
59
             this.label_blc_TK.Size = new System.Drawing.Size(52, 15);
60
             this.label_blc_TK.Size = new System.Drawing.Size(52, 15);
68
             "1:500",
69
             "1:500",
69
             "1:1000",
70
             "1:1000",
70
             "1:2000"});
71
             "1:2000"});
71
-            this.comboBox_BLC1.Location = new System.Drawing.Point(366, 301);
72
+            this.comboBox_BLC1.Location = new System.Drawing.Point(364, 332);
72
             this.comboBox_BLC1.Margin = new System.Windows.Forms.Padding(4);
73
             this.comboBox_BLC1.Margin = new System.Windows.Forms.Padding(4);
73
             this.comboBox_BLC1.Name = "comboBox_BLC1";
74
             this.comboBox_BLC1.Name = "comboBox_BLC1";
74
             this.comboBox_BLC1.Size = new System.Drawing.Size(166, 23);
75
             this.comboBox_BLC1.Size = new System.Drawing.Size(166, 23);
76
             // 
77
             // 
77
             // textBox_DH
78
             // textBox_DH
78
             // 
79
             // 
79
-            this.textBox_DH.Location = new System.Drawing.Point(133, 299);
80
+            this.textBox_DH.Location = new System.Drawing.Point(131, 330);
80
             this.textBox_DH.Margin = new System.Windows.Forms.Padding(4);
81
             this.textBox_DH.Margin = new System.Windows.Forms.Padding(4);
81
             this.textBox_DH.Name = "textBox_DH";
82
             this.textBox_DH.Name = "textBox_DH";
82
             this.textBox_DH.Size = new System.Drawing.Size(156, 25);
83
             this.textBox_DH.Size = new System.Drawing.Size(156, 25);
157
             // 
158
             // 
158
             // btn_Cancel
159
             // btn_Cancel
159
             // 
160
             // 
160
-            this.btn_Cancel.Location = new System.Drawing.Point(323, 418);
161
+            this.btn_Cancel.Location = new System.Drawing.Point(321, 449);
161
             this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
162
             this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
162
             this.btn_Cancel.Name = "btn_Cancel";
163
             this.btn_Cancel.Name = "btn_Cancel";
163
             this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
164
             this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
168
             // 
169
             // 
169
             // btn_OK
170
             // btn_OK
170
             // 
171
             // 
171
-            this.btn_OK.Location = new System.Drawing.Point(172, 417);
172
+            this.btn_OK.Location = new System.Drawing.Point(170, 448);
172
             this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
173
             this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
173
             this.btn_OK.Name = "btn_OK";
174
             this.btn_OK.Name = "btn_OK";
174
             this.btn_OK.Size = new System.Drawing.Size(100, 29);
175
             this.btn_OK.Size = new System.Drawing.Size(100, 29);
180
             // label1
181
             // label1
181
             // 
182
             // 
182
             this.label1.AutoSize = true;
183
             this.label1.AutoSize = true;
183
-            this.label1.Location = new System.Drawing.Point(49, 376);
184
+            this.label1.Location = new System.Drawing.Point(47, 407);
184
             this.label1.Name = "label1";
185
             this.label1.Name = "label1";
185
             this.label1.Size = new System.Drawing.Size(82, 15);
186
             this.label1.Size = new System.Drawing.Size(82, 15);
186
             this.label1.TabIndex = 110;
187
             this.label1.TabIndex = 110;
188
             // 
189
             // 
189
             // textBox_savepath
190
             // textBox_savepath
190
             // 
191
             // 
191
-            this.textBox_savepath.Location = new System.Drawing.Point(137, 373);
192
+            this.textBox_savepath.Location = new System.Drawing.Point(135, 404);
192
             this.textBox_savepath.Name = "textBox_savepath";
193
             this.textBox_savepath.Name = "textBox_savepath";
193
             this.textBox_savepath.Size = new System.Drawing.Size(304, 25);
194
             this.textBox_savepath.Size = new System.Drawing.Size(304, 25);
194
             this.textBox_savepath.TabIndex = 111;
195
             this.textBox_savepath.TabIndex = 111;
195
             // 
196
             // 
196
             // button_chse
197
             // button_chse
197
             // 
198
             // 
198
-            this.button_chse.Location = new System.Drawing.Point(457, 369);
199
+            this.button_chse.Location = new System.Drawing.Point(455, 400);
199
             this.button_chse.Name = "button_chse";
200
             this.button_chse.Name = "button_chse";
200
             this.button_chse.Size = new System.Drawing.Size(75, 29);
201
             this.button_chse.Size = new System.Drawing.Size(75, 29);
201
             this.button_chse.TabIndex = 112;
202
             this.button_chse.TabIndex = 112;
206
             // label_DH
207
             // label_DH
207
             // 
208
             // 
208
             this.label_DH.AutoSize = true;
209
             this.label_DH.AutoSize = true;
209
-            this.label_DH.Location = new System.Drawing.Point(73, 307);
210
+            this.label_DH.Location = new System.Drawing.Point(71, 338);
210
             this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
211
             this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
211
             this.label_DH.Name = "label_DH";
212
             this.label_DH.Name = "label_DH";
212
             this.label_DH.Size = new System.Drawing.Size(37, 15);
213
             this.label_DH.Size = new System.Drawing.Size(37, 15);
216
             // label2
217
             // label2
217
             // 
218
             // 
218
             this.label2.AutoSize = true;
219
             this.label2.AutoSize = true;
219
-            this.label2.Location = new System.Drawing.Point(51, 340);
220
+            this.label2.Location = new System.Drawing.Point(49, 371);
220
             this.label2.Name = "label2";
221
             this.label2.Name = "label2";
221
             this.label2.Size = new System.Drawing.Size(187, 15);
222
             this.label2.Size = new System.Drawing.Size(187, 15);
222
             this.label2.TabIndex = 113;
223
             this.label2.TabIndex = 113;
224
             // 
225
             // 
225
             // textBox_secret
226
             // textBox_secret
226
             // 
227
             // 
227
-            this.textBox_secret.Location = new System.Drawing.Point(244, 337);
228
+            this.textBox_secret.Location = new System.Drawing.Point(242, 368);
228
             this.textBox_secret.Name = "textBox_secret";
229
             this.textBox_secret.Name = "textBox_secret";
229
             this.textBox_secret.Size = new System.Drawing.Size(151, 25);
230
             this.textBox_secret.Size = new System.Drawing.Size(151, 25);
230
             this.textBox_secret.TabIndex = 114;
231
             this.textBox_secret.TabIndex = 114;
231
             // 
232
             // 
233
+            // textBox_FCY
234
+            // 
235
+            this.textBox_FCY.Location = new System.Drawing.Point(76, 297);
236
+            this.textBox_FCY.Margin = new System.Windows.Forms.Padding(4);
237
+            this.textBox_FCY.Name = "textBox_FCY";
238
+            this.textBox_FCY.Size = new System.Drawing.Size(213, 25);
239
+            this.textBox_FCY.TabIndex = 115;
240
+            this.textBox_FCY.Text = "复查员 ";
241
+            // 
232
             // TKInfo
242
             // TKInfo
233
             // 
243
             // 
234
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
244
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
235
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
245
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
236
-            this.ClientSize = new System.Drawing.Size(610, 457);
246
+            this.ClientSize = new System.Drawing.Size(610, 510);
247
+            this.Controls.Add(this.textBox_FCY);
237
             this.Controls.Add(this.textBox_secret);
248
             this.Controls.Add(this.textBox_secret);
238
             this.Controls.Add(this.label2);
249
             this.Controls.Add(this.label2);
239
             this.Controls.Add(this.button_chse);
250
             this.Controls.Add(this.button_chse);
282
         private System.Windows.Forms.Label label_DH;
293
         private System.Windows.Forms.Label label_DH;
283
         private System.Windows.Forms.Label label2;
294
         private System.Windows.Forms.Label label2;
284
         private System.Windows.Forms.TextBox textBox_secret;
295
         private System.Windows.Forms.TextBox textBox_secret;
296
+        private System.Windows.Forms.TextBox textBox_FCY;
285
     }
297
     }
286
 }
298
 }

+ 3
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.cs View File

51
             this.textBox_TDY.Text = Properties.Settings.Default.TDY;
51
             this.textBox_TDY.Text = Properties.Settings.Default.TDY;
52
             this.textBox_SHY.Text = Properties.Settings.Default.SDY;
52
             this.textBox_SHY.Text = Properties.Settings.Default.SDY;
53
             this.textBox_JCY.Text = Properties.Settings.Default.JCY;
53
             this.textBox_JCY.Text = Properties.Settings.Default.JCY;
54
+            this.textBox_FCY.Text = Properties.Settings.Default.FCY;
54
             this.textBox_DH.Text = Properties.Settings.Default.DH.ToString();
55
             this.textBox_DH.Text = Properties.Settings.Default.DH.ToString();
55
             this.textBox_secret.Text = Properties.Settings.Default.secret.ToString();
56
             this.textBox_secret.Text = Properties.Settings.Default.secret.ToString();
56
             textBox_savepath.Text = Properties.Settings.Default.svpath;
57
             textBox_savepath.Text = Properties.Settings.Default.svpath;
80
             TDY = this.textBox_TDY.Text;
81
             TDY = this.textBox_TDY.Text;
81
             SHY = this.textBox_SHY.Text;
82
             SHY = this.textBox_SHY.Text;
82
             JCY = this.textBox_JCY.Text;
83
             JCY = this.textBox_JCY.Text;
84
+            FCY = this.textBox_FCY.Text;
83
             SV = textBox_savepath.Text;
85
             SV = textBox_savepath.Text;
84
             Secret = textBox_secret.Text;
86
             Secret = textBox_secret.Text;
85
 
87
 
112
             Properties.Settings.Default.JCY = JCY;
114
             Properties.Settings.Default.JCY = JCY;
113
             Properties.Settings.Default.TDY = TDY;
115
             Properties.Settings.Default.TDY = TDY;
114
             Properties.Settings.Default.SDY = SHY;
116
             Properties.Settings.Default.SDY = SHY;
117
+            Properties.Settings.Default.FCY = FCY;
115
             Properties.Settings.Default.DH = DH;
118
             Properties.Settings.Default.DH = DH;
116
             Properties.Settings.Default.svpath = SV;
119
             Properties.Settings.Default.svpath = SV;
117
             Properties.Settings.Default.secret = Secret;
120
             Properties.Settings.Default.secret = Secret;

BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/Drawing4.dwg View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/Drawing5.dwg View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll View File


+ 3
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll.config View File

51
       <setting name="dgj" serializeAs="String">
51
       <setting name="dgj" serializeAs="String">
52
         <value>1</value>
52
         <value>1</value>
53
       </setting>
53
       </setting>
54
+      <setting name="FCY" serializeAs="String">
55
+        <value>复查员 </value>
56
+      </setting>
54
     </HCTools.Properties.Settings>
57
     </HCTools.Properties.Settings>
55
   </userSettings>
58
   </userSettings>
56
 </configuration>
59
 </configuration>

BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.pdb View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferences.cache View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.SlopeL.resources View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.AssemblyReference.cache View File


+ 1
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.CoreCompileInputs.cache View File

1
-77524447917898d81ef1041c17a73b0be2e35819
1
+4620f6557c0d9e1f9339fb181ffa0df02e8e9c57

+ 2
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.FileListAbsolute.txt View File

62
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.CopyComplete
62
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.CopyComplete
63
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.dll
63
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.dll
64
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.pdb
64
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.pdb
65
-F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.AssemblyReference.cache
66
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.ModifyTFH.resources
65
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.ModifyTFH.resources
67
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.JQXlabel.resources
66
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.JQXlabel.resources
68
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.InsertDOMs_to_one.resources
67
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.InsertDOMs_to_one.resources
68
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.AssemblyReference.cache
69
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.SlopeL.resources

BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.GenerateResource.cache View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.dll View File


BIN
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.pdb View File


Loading…
Cancel
Save