Browse Source

修改自动输出图框和接图表替换

qyx 1 month ago
parent
commit
8722d67bfa
31 changed files with 1568 additions and 972 deletions
  1. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/.vs/Thumbnail/v16/.suo
  2. 1
    2
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.Designer.cs
  3. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll
  4. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.pdb
  5. 216
    9
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/getThumbnail.cs
  6. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  7. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.AssemblyReference.cache
  8. 1
    1
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.CoreCompileInputs.cache
  9. 11
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.FileListAbsolute.txt
  10. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.GenerateResource.cache
  11. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.dll
  12. BIN
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.pdb
  13. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/.suo
  14. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/App.config
  15. 1218
    923
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs
  16. 46
    15
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ChPLConstradiction1.cs
  17. 12
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.Designer.cs
  18. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.settings
  19. 1
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtLinecontradiction.cs
  20. 43
    20
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.Designer.cs
  21. 10
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.cs
  22. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll
  23. 3
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll.config
  24. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.pdb
  25. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  26. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  27. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.CutCountL.resources
  28. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.AssemblyReference.cache
  29. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.GenerateResource.cache
  30. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.dll
  31. BIN
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.pdb

BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/.vs/Thumbnail/v16/.suo View File


+ 1
- 2
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.Designer.cs View File

151
             "1:500",
151
             "1:500",
152
             "1:1000",
152
             "1:1000",
153
             "1:2000",
153
             "1:2000",
154
-            "1:5000",
155
-            "1:10000"});
154
+            "1:5000"});
156
             this.comboBox_blc.Location = new System.Drawing.Point(207, 250);
155
             this.comboBox_blc.Location = new System.Drawing.Point(207, 250);
157
             this.comboBox_blc.Name = "comboBox_blc";
156
             this.comboBox_blc.Name = "comboBox_blc";
158
             this.comboBox_blc.Size = new System.Drawing.Size(172, 23);
157
             this.comboBox_blc.Size = new System.Drawing.Size(172, 23);

BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll View File


BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.pdb View File


+ 216
- 9
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/getThumbnail.cs View File

66
                     ObjectIdCollection pllcoll = new ObjectIdCollection();
66
                     ObjectIdCollection pllcoll = new ObjectIdCollection();
67
                     SelectionSet ss = psr.Value;
67
                     SelectionSet ss = psr.Value;
68
                     ObjectIdCollection idcoll1 = new ObjectIdCollection(ss.GetObjectIds());
68
                     ObjectIdCollection idcoll1 = new ObjectIdCollection(ss.GetObjectIds());
69
+                    double searchlength = 250 * bl + 5.75 * bl * 2;
70
+                    if(bl==10)
71
+                        searchlength = 2595;
69
                     for (int i = 0; i < idcoll1.Count; i++)
72
                     for (int i = 0; i < idcoll1.Count; i++)
70
                     {
73
                     {
71
                         using (Transaction trans = doc.Database.TransactionManager.StartTransaction())
74
                         using (Transaction trans = doc.Database.TransactionManager.StartTransaction())
74
                             if (ent is Polyline)
77
                             if (ent is Polyline)
75
                             {
78
                             {
76
                                 Polyline pll = (Polyline)ent;
79
                                 Polyline pll = (Polyline)ent;
77
-                                if (pll.Length == 250 * bl + 5.75 * bl * 2 & pll.Closed == false)
80
+                                if (pll.Length == searchlength & pll.Closed == false)
78
                                     pllcoll.Add(idcoll1[i]);
81
                                     pllcoll.Add(idcoll1[i]);
79
                             }
82
                             }
80
                             if (ent is Polyline2d)
83
                             if (ent is Polyline2d)
81
                             {
84
                             {
82
                                 Polyline2d pll = (Polyline2d)ent;
85
                                 Polyline2d pll = (Polyline2d)ent;
83
-                                if (pll.Length == 250 * bl + 5.75 * bl * 2 & pll.Closed == false)
86
+                                if (pll.Length == searchlength & pll.Closed == false)
84
                                     pllcoll.Add(idcoll1[i]);
87
                                     pllcoll.Add(idcoll1[i]);
85
                             }
88
                             }
86
                             trans.Commit();
89
                             trans.Commit();
96
                 getIntersecttk(tkinfolist, ptcoll, tf);
99
                 getIntersecttk(tkinfolist, ptcoll, tf);
97
                 move(doc, tkinfolist, tf, ptcoll);
100
                 move(doc, tkinfolist, tf, ptcoll);
98
                 deletetk(doc, tkinfolist, tf);
101
                 deletetk(doc, tkinfolist, tf);
99
-                ObjectId HZ= createTextStyle(doc);
102
+                ObjectId HZ = createTextStyle(doc);
100
                 draw(doc, ptcoll, tf, HZ);
103
                 draw(doc, ptcoll, tf, HZ);
101
                 if (tf.Count == 0 || tf == null)
104
                 if (tf.Count == 0 || tf == null)
102
                 {
105
                 {
126
                         }
129
                         }
127
                     }
130
                     }
128
                 }
131
                 }
129
-                //}
130
                 dynamic acadApp = GrxCAD.ApplicationServices.Application.AcadApplication;
132
                 dynamic acadApp = GrxCAD.ApplicationServices.Application.AcadApplication;
131
                 acadApp.ZoomExtents();
133
                 acadApp.ZoomExtents();
132
                 doc.Database.SaveAs(savepath + "\\" + filename[filenum], true, DwgVersion.AC1024, doc.Database.SecurityParameters);
134
                 doc.Database.SaveAs(savepath + "\\" + filename[filenum], true, DwgVersion.AC1024, doc.Database.SecurityParameters);
380
                                         foreach (Point3d temppt in tkinfolist[ii].ptcoll)
382
                                         foreach (Point3d temppt in tkinfolist[ii].ptcoll)
381
                                         {
383
                                         {
382
                                             //筛选窗口内图幅
384
                                             //筛选窗口内图幅
383
-                                            if (temppt.X > pt1.X && temppt.X < pt2.X &&
384
-                                                temppt.Y > pt1.Y && temppt.Y < pt2.Y)
385
+                                            if (Math.Round(temppt.X, 4) > Math.Round(pt1.X, 4) &&
386
+                                                Math.Round(temppt.X, 4) < Math.Round(pt2.X, 4) &&
387
+                                                Math.Round(temppt.Y, 4) > Math.Round(pt1.Y, 4) &&
388
+                                                Math.Round(temppt.Y, 4) < Math.Round(pt2.Y, 4))
385
                                             {
389
                                             {
386
                                                 tkinfo pt = new tkinfo();
390
                                                 tkinfo pt = new tkinfo();
387
                                                 pt.id = tkinfolist[ii].id;
391
                                                 pt.id = tkinfolist[ii].id;
409
         {
413
         {
410
             Point3d Frompt = new Point3d(ptcoll[0].X - (261.5 * bl - 5.75 * bl * 2), ptcoll[0].Y - (261.5 * bl - 5.75 * bl * 2), 0);//基点
414
             Point3d Frompt = new Point3d(ptcoll[0].X - (261.5 * bl - 5.75 * bl * 2), ptcoll[0].Y - (261.5 * bl - 5.75 * bl * 2), 0);//基点
411
             Point3d Topt = new Point3d(ptcoll[3].X, ptcoll[3].Y + 5.75 * bl + 1.75 * bl, 0);//目标点
415
             Point3d Topt = new Point3d(ptcoll[3].X, ptcoll[3].Y + 5.75 * bl + 1.75 * bl, 0);//目标点
416
+            if(bl==10)
417
+            {
418
+                Frompt = new Point3d(ptcoll[0].X - 2500, ptcoll[0].Y - 2500, 0);
419
+                Topt = new Point3d(ptcoll[3].X, ptcoll[3].Y + 48.75 + 15, 0);
420
+            }
412
             for (int i = 0; i < tf.Count; i++)
421
             for (int i = 0; i < tf.Count; i++)
413
             {
422
             {
414
                 for (int j = 0; j < tkinfolist.Count; j++)
423
                 for (int j = 0; j < tkinfolist.Count; j++)
471
             SelectionFilter filter_tfk = new SelectionFilter(value_tfk);
480
             SelectionFilter filter_tfk = new SelectionFilter(value_tfk);
472
             Point3d pt1 = new Point3d(ptcoll[3].X, ptcoll[3].Y + 5.75 * bl + 1.75 * bl, 0);
481
             Point3d pt1 = new Point3d(ptcoll[3].X, ptcoll[3].Y + 5.75 * bl + 1.75 * bl, 0);
473
             Point3d pt2 = new Point3d(ptcoll[3].X + 22.5 * bl, ptcoll[3].Y + (5.5 + 0.5 + 1.5) * bl + 12 * bl + 10, 0);
482
             Point3d pt2 = new Point3d(ptcoll[3].X + 22.5 * bl, ptcoll[3].Y + (5.5 + 0.5 + 1.5) * bl + 12 * bl + 10, 0);
483
+            if (bl == 10)
484
+            {
485
+                pt1 = new Point3d(ptcoll[3].X, ptcoll[3].Y + 50, 0);
486
+                pt2 = new Point3d(ptcoll[3].X + 22.5 * bl, ptcoll[3].Y + 47.5 + 1.25 + 15 + 12 * bl, 0);
487
+            }
474
             //dynamic acadApp = GrxCAD.ApplicationServices.Application.AcadApplication;
488
             //dynamic acadApp = GrxCAD.ApplicationServices.Application.AcadApplication;
475
             //acadApp.ZoomExtents();
489
             //acadApp.ZoomExtents();
476
             //using (DocumentLock docTargetLock = doc.LockDocument())
490
             //using (DocumentLock docTargetLock = doc.LockDocument())
583
         /// <summary>
597
         /// <summary>
584
         /// 绘制接图表
598
         /// 绘制接图表
585
         /// </summary>
599
         /// </summary>
586
-        private void draw(Document doc, Point3dCollection ptcoll, List<tkinfo> tf,ObjectId HZ)
600
+        private void draw(Document doc, Point3dCollection ptcoll, List<tkinfo> tf, ObjectId HZ)
587
         {
601
         {
588
             Point2d p1 = new Point2d();
602
             Point2d p1 = new Point2d();
589
             Point2d p2 = new Point2d();
603
             Point2d p2 = new Point2d();
595
             double dist_w2jt = 1.75 * bl;  //外框到接图表距离
609
             double dist_w2jt = 1.75 * bl;  //外框到接图表距离
596
             double dist_tc = Math.Sqrt((0.5 * bl) * (0.5 * bl) * 2);
610
             double dist_tc = Math.Sqrt((0.5 * bl) * (0.5 * bl) * 2);
597
             double dist_tc1 = 0.404 * bl;
611
             double dist_tc1 = 0.404 * bl;
612
+            if (bl == 10)
613
+            {
614
+                dist_nw = 48.75;  //内外框距离
615
+                dist_w2jt = 15;  //外框到接图表距离
616
+                dist_tc = 7;
617
+                dist_tc1 = 0.349;
618
+            }
598
             List<tkinfo> zj_x = new List<tkinfo>();//只有x方向中间错位的图框
619
             List<tkinfo> zj_x = new List<tkinfo>();//只有x方向中间错位的图框
599
             List<tkinfo> zj_y = new List<tkinfo>();//只有y方向中间错位的图框
620
             List<tkinfo> zj_y = new List<tkinfo>();//只有y方向中间错位的图框
600
             //double cw_x = -9999;//错位图框左下角x坐标
621
             //double cw_x = -9999;//错位图框左下角x坐标
601
             //double cw_y = -9999;//错位图框左下角y坐标
622
             //double cw_y = -9999;//错位图框左下角y坐标
602
             Point3dCollection cw_x = new Point3dCollection();//x方向错位图框左下角点
623
             Point3dCollection cw_x = new Point3dCollection();//x方向错位图框左下角点
603
             Point3dCollection cw_y = new Point3dCollection();//y方向错位图框左下角点
624
             Point3dCollection cw_y = new Point3dCollection();//y方向错位图框左下角点
625
+            List<Polyline> x_addline = new List<Polyline>();
626
+            List<Polyline> y_addline = new List<Polyline>();
604
 
627
 
605
             using (Transaction trans = doc.Database.TransactionManager.StartTransaction())
628
             using (Transaction trans = doc.Database.TransactionManager.StartTransaction())
606
             {
629
             {
1399
                                 pll_ad.SetDatabaseDefaults();
1422
                                 pll_ad.SetDatabaseDefaults();
1400
                                 btr.AppendEntity(pll_ad);
1423
                                 btr.AppendEntity(pll_ad);
1401
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1424
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1425
+                                x_addline.Add(pll_ad);
1402
                                 //判断宽度能否放下文字
1426
                                 //判断宽度能否放下文字
1403
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1427
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1404
                                 tfh_temp.TextStyleId = HZ;
1428
                                 tfh_temp.TextStyleId = HZ;
1501
                                 pll_ad.SetDatabaseDefaults();
1525
                                 pll_ad.SetDatabaseDefaults();
1502
                                 btr.AppendEntity(pll_ad);
1526
                                 btr.AppendEntity(pll_ad);
1503
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1527
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1528
+                                x_addline.Add(pll_ad);
1504
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1529
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1505
                                 tfh_temp.TextStyleId = HZ;
1530
                                 tfh_temp.TextStyleId = HZ;
1506
                                 tfh_temp.HorizontalMode = TextHorizontalMode.TextCenter;
1531
                                 tfh_temp.HorizontalMode = TextHorizontalMode.TextCenter;
1695
                                 pll_cg_1.SetDatabaseDefaults();
1720
                                 pll_cg_1.SetDatabaseDefaults();
1696
                                 btr.AppendEntity(pll_cg_1);
1721
                                 btr.AppendEntity(pll_cg_1);
1697
                                 tran.AddNewlyCreatedDBObject(pll_cg_1, true);
1722
                                 tran.AddNewlyCreatedDBObject(pll_cg_1, true);
1723
+                                x_addline.Add(pll_cg);
1724
+                                x_addline.Add(pll_cg_1);
1698
                                 DBText tfh = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1725
                                 DBText tfh = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1699
                                 tfh.HorizontalMode = TextHorizontalMode.TextCenter;
1726
                                 tfh.HorizontalMode = TextHorizontalMode.TextCenter;
1700
                                 tfh.VerticalMode = TextVerticalMode.TextVerticalMid;
1727
                                 tfh.VerticalMode = TextVerticalMode.TextVerticalMid;
1761
                                 pll_ad.SetDatabaseDefaults();
1788
                                 pll_ad.SetDatabaseDefaults();
1762
                                 btr.AppendEntity(pll_ad);
1789
                                 btr.AppendEntity(pll_ad);
1763
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1790
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1791
+                                y_addline.Add(pll_ad);
1764
                                 //判断高度能否放下文字
1792
                                 //判断高度能否放下文字
1765
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1793
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1766
                                 tfh_temp.TextStyleId = HZ;
1794
                                 tfh_temp.TextStyleId = HZ;
1862
                                 pll_ad.SetDatabaseDefaults();
1890
                                 pll_ad.SetDatabaseDefaults();
1863
                                 btr.AppendEntity(pll_ad);
1891
                                 btr.AppendEntity(pll_ad);
1864
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1892
                                 tran.AddNewlyCreatedDBObject(pll_ad, true);
1893
+                                y_addline.Add(pll_ad);
1865
                                 //判断高度能否放下文字
1894
                                 //判断高度能否放下文字
1866
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1895
                                 DBText tfh_temp = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
1867
                                 tfh_temp.TextStyleId = HZ;
1896
                                 tfh_temp.TextStyleId = HZ;
2058
                                 pll_cg_2.SetDatabaseDefaults();
2087
                                 pll_cg_2.SetDatabaseDefaults();
2059
                                 btr.AppendEntity(pll_cg_2);
2088
                                 btr.AppendEntity(pll_cg_2);
2060
                                 tran.AddNewlyCreatedDBObject(pll_cg_2, true);
2089
                                 tran.AddNewlyCreatedDBObject(pll_cg_2, true);
2090
+                                y_addline.Add(pll_cg_1);
2091
+                                y_addline.Add(pll_cg_2);
2061
                                 DBText tfh = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
2092
                                 DBText tfh = tran.GetObject(tf[i].tfhid, OpenMode.ForWrite) as DBText;
2062
                                 tfh.HorizontalMode = TextHorizontalMode.TextCenter;
2093
                                 tfh.HorizontalMode = TextHorizontalMode.TextCenter;
2063
                                 tfh.VerticalMode = TextVerticalMode.TextVerticalMid;
2094
                                 tfh.VerticalMode = TextVerticalMode.TextVerticalMid;
2180
                     tran.Commit();
2211
                     tran.Commit();
2181
                 }
2212
                 }
2182
             }
2213
             }
2214
+
2215
+            if (x_addline.Count != 0)
2216
+            {
2217
+                for (int i = 0; i < x_addline.Count; i++)
2218
+                {
2219
+                    Polyline pl = x_addline[i];
2220
+                    if (pl.StartPoint.X == pl.EndPoint.X)
2221
+                        ifneedaddline(pl, doc, dist_l, 0);
2222
+                    else
2223
+                        ifneedaddline(pl, doc, dist_w, 1);
2224
+                }
2225
+            }
2183
         }
2226
         }
2184
 
2227
 
2185
 
2228
 
2394
             }
2437
             }
2395
         }
2438
         }
2396
 
2439
 
2440
+
2441
+        private void ifneedaddline(Polyline pl, Document doc, double length,int index)
2442
+        {
2443
+            bool flag1 = false;
2444
+            bool flag2 = false;
2445
+            length = length + 0.1;
2446
+            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2447
+            if (index == 0)
2448
+            {
2449
+                double y = Math.Min(pl.StartPoint.Y, pl.EndPoint.Y) + Math.Abs(pl.StartPoint.Y - pl.EndPoint.Y) / 2;
2450
+                Point3dCollection ptcol1 = new Point3dCollection();
2451
+                ptcol1.Add(new Point3d(pl.StartPoint.X, y, 0));
2452
+                ptcol1.Add(new Point3d(pl.StartPoint.X + length, y, 0));
2453
+                Point3dCollection ptcol2 = new Point3dCollection();
2454
+                ptcol2.Add(new Point3d(pl.StartPoint.X, y, 0));
2455
+                ptcol2.Add(new Point3d(pl.StartPoint.X - length, y, 0));
2456
+                TypedValue[] value = new TypedValue[]
2457
+                {
2458
+                     new TypedValue((int)DxfCode.LayerName,"9800"),
2459
+                                new TypedValue((int)DxfCode.Start,"LWPOLYLINE,POLYLINE")
2460
+                };
2461
+                SelectionFilter filter = new SelectionFilter(value);
2462
+                PromptSelectionResult psr1 = ed.SelectFence(ptcol1, filter);
2463
+                PromptSelectionResult psr2 = ed.SelectFence(ptcol2, filter);
2464
+                ObjectIdCollection idcoll1 = new ObjectIdCollection();
2465
+                ObjectIdCollection idcoll2 = new ObjectIdCollection();
2466
+                if (psr1.Status == PromptStatus.OK)
2467
+                {
2468
+                    SelectionSet ss = psr1.Value;
2469
+                    idcoll1 = new ObjectIdCollection(ss.GetObjectIds());
2470
+                }
2471
+                if (psr2.Status == PromptStatus.OK)
2472
+                {
2473
+                    SelectionSet ss = psr2.Value;
2474
+                    idcoll2 = new ObjectIdCollection(ss.GetObjectIds());
2475
+                }
2476
+                using (Transaction tran = doc.Database.TransactionManager.StartTransaction())
2477
+                {
2478
+                    BlockTable bt = (BlockTable)tran.GetObject(doc.Database.BlockTableId, OpenMode.ForRead);
2479
+                    BlockTableRecord btr = (BlockTableRecord)tran.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
2480
+                    for (int i = 0; i < idcoll1.Count; i++)
2481
+                    {
2482
+                        Polyline neighbpl = tran.GetObject(idcoll1[i], OpenMode.ForRead) as Polyline;
2483
+                        if (Math.Round(neighbpl.StartPoint.X, 4) == Math.Round(neighbpl.EndPoint.X, 4)&& idcoll1[i]!=pl.ObjectId)
2484
+                        {
2485
+                            flag1 = true;
2486
+                            break;
2487
+                        }
2488
+                    }
2489
+                    if(flag1==false)
2490
+                    {
2491
+                        Polyline ad_pl1 = new Polyline();
2492
+                        ad_pl1.AddVertexAt(0, new Point2d(pl.StartPoint.X + length, pl.StartPoint.Y), 0, 0, 0);
2493
+                        ad_pl1.AddVertexAt(1, new Point2d(pl.StartPoint.X + length, pl.EndPoint.Y), 0, 0, 0);
2494
+                        ad_pl1.Layer = "9800";
2495
+                        ad_pl1.Linetype = "Bylayer";
2496
+                        ad_pl1.SetDatabaseDefaults();
2497
+                        btr.AppendEntity(ad_pl1);
2498
+                        tran.AddNewlyCreatedDBObject(ad_pl1, true);
2499
+                    }
2500
+                    for (int i = 0; i < idcoll2.Count; i++)
2501
+                    {
2502
+                        Polyline neighbpl = tran.GetObject(idcoll2[i], OpenMode.ForRead) as Polyline;
2503
+                        if (Math.Round(neighbpl.StartPoint.X, 4) == Math.Round(neighbpl.EndPoint.X, 4) && idcoll2[i] != pl.ObjectId)
2504
+                        {
2505
+                            flag2 = true;
2506
+                            break;
2507
+                        }
2508
+                    }
2509
+                    if (flag2==false)
2510
+                    {
2511
+                        Polyline ad_pl2 = new Polyline();
2512
+                        ad_pl2.AddVertexAt(0, new Point2d(pl.StartPoint.X - length, pl.StartPoint.Y), 0, 0, 0);
2513
+                        ad_pl2.AddVertexAt(1, new Point2d(pl.StartPoint.X - length, pl.EndPoint.Y), 0, 0, 0);
2514
+                        ad_pl2.Layer = "9800";
2515
+                        ad_pl2.Linetype = "Bylayer";
2516
+                        ad_pl2.SetDatabaseDefaults();
2517
+                        btr.AppendEntity(ad_pl2);
2518
+                        tran.AddNewlyCreatedDBObject(ad_pl2, true);
2519
+                    }
2520
+                    tran.Commit();
2521
+                }
2522
+            }
2523
+            if (index == 1)
2524
+            {
2525
+                double x = Math.Min(pl.StartPoint.X, pl.EndPoint.X) + Math.Abs(pl.StartPoint.X - pl.EndPoint.X) / 2;
2526
+                Point3dCollection ptcol1 = new Point3dCollection();
2527
+                ptcol1.Add(new Point3d(x, pl.StartPoint.Y, 0));
2528
+                ptcol1.Add(new Point3d(x, pl.StartPoint.Y + length, 0));
2529
+                Point3dCollection ptcol2 = new Point3dCollection();
2530
+                ptcol2.Add(new Point3d(x, pl.StartPoint.Y, 0));
2531
+                ptcol2.Add(new Point3d(x, pl.StartPoint.Y - length, 0));
2532
+                TypedValue[] value = new TypedValue[]
2533
+                {
2534
+                     new TypedValue((int)DxfCode.LayerName,"9800"),
2535
+                                new TypedValue((int)DxfCode.Start,"LWPOLYLINE,POLYLINE")
2536
+                };
2537
+                SelectionFilter filter = new SelectionFilter(value);
2538
+                PromptSelectionResult psr1 = ed.SelectFence(ptcol1, filter);
2539
+                PromptSelectionResult psr2 = ed.SelectFence(ptcol2, filter);
2540
+                ObjectIdCollection idcoll1 = new ObjectIdCollection();
2541
+                ObjectIdCollection idcoll2 = new ObjectIdCollection();
2542
+                if (psr1.Status == PromptStatus.OK)
2543
+                {
2544
+                    SelectionSet ss = psr1.Value;
2545
+                    idcoll1 = new ObjectIdCollection(ss.GetObjectIds());
2546
+                }
2547
+                if (psr2.Status == PromptStatus.OK)
2548
+                {
2549
+                    SelectionSet ss = psr2.Value;
2550
+                    idcoll2 = new ObjectIdCollection(ss.GetObjectIds());
2551
+                }
2552
+                using (Transaction tran = doc.Database.TransactionManager.StartTransaction())
2553
+                {
2554
+                    BlockTable bt = (BlockTable)tran.GetObject(doc.Database.BlockTableId, OpenMode.ForRead);
2555
+                    BlockTableRecord btr = (BlockTableRecord)tran.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
2556
+                    for (int i = 0; i < idcoll1.Count; i++)
2557
+                    {
2558
+                        Polyline neighbpl = tran.GetObject(idcoll1[i], OpenMode.ForRead) as Polyline;
2559
+                        if (Math.Round(neighbpl.StartPoint.Y, 4) == Math.Round(neighbpl.EndPoint.Y, 4) && idcoll1[i] != pl.ObjectId)
2560
+                        {
2561
+                            flag1 = true;
2562
+                            break;
2563
+                        }
2564
+                    }
2565
+                    if (flag1 == false)
2566
+                    {
2567
+                        Polyline ad_pl1 = new Polyline();
2568
+                        ad_pl1.AddVertexAt(0, new Point2d(pl.StartPoint.X, pl.StartPoint.Y + length), 0, 0, 0);
2569
+                        ad_pl1.AddVertexAt(1, new Point2d(pl.EndPoint.X, pl.EndPoint.Y + length), 0, 0, 0);
2570
+                        ad_pl1.Layer = "9800";
2571
+                        ad_pl1.Linetype = "Bylayer";
2572
+                        ad_pl1.SetDatabaseDefaults();
2573
+                        btr.AppendEntity(ad_pl1);
2574
+                        tran.AddNewlyCreatedDBObject(ad_pl1, true);
2575
+                    }
2576
+                    for (int i = 0; i < idcoll2.Count; i++)
2577
+                    {
2578
+                        Polyline neighbpl = tran.GetObject(idcoll2[i], OpenMode.ForRead) as Polyline;
2579
+                        if (Math.Round(neighbpl.StartPoint.Y, 4) == Math.Round(neighbpl.EndPoint.Y, 4) && idcoll2[i] != pl.ObjectId)
2580
+                        {
2581
+                            flag2 = true;
2582
+                            break;
2583
+                        }
2584
+                    }
2585
+                    if (flag2 == false)
2586
+                    {
2587
+                        Polyline ad_pl2 = new Polyline();
2588
+                        ad_pl2.AddVertexAt(0, new Point2d(pl.StartPoint.X, pl.StartPoint.Y - length), 0, 0, 0);
2589
+                        ad_pl2.AddVertexAt(1, new Point2d(pl.StartPoint.X, pl.EndPoint.Y - length), 0, 0, 0);
2590
+                        ad_pl2.Layer = "9800";
2591
+                        ad_pl2.Linetype = "Bylayer";
2592
+                        ad_pl2.SetDatabaseDefaults();
2593
+                        btr.AppendEntity(ad_pl2);
2594
+                        tran.AddNewlyCreatedDBObject(ad_pl2, true);
2595
+                    }
2596
+                    tran.Commit();
2597
+                }
2598
+
2599
+            }
2600
+        }
2601
+
2602
+
2603
+
2397
         public ObjectId createTextStyle(Document doc)
2604
         public ObjectId createTextStyle(Document doc)
2398
         {
2605
         {
2399
-            Database database = doc.Database; 
2606
+            Database database = doc.Database;
2400
             ObjectId textstyleID = new ObjectId();
2607
             ObjectId textstyleID = new ObjectId();
2401
             string stylename = "HZ";
2608
             string stylename = "HZ";
2402
             using (Transaction traction = database.TransactionManager.StartTransaction())
2609
             using (Transaction traction = database.TransactionManager.StartTransaction())
2427
             }
2634
             }
2428
             return textstyleID;
2635
             return textstyleID;
2429
         }
2636
         }
2430
-
2431
     }
2637
     }
2432
 }
2638
 }
2433
 
2639
 
2640
+

BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferences.cache View File


BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.AssemblyReference.cache View File


+ 1
- 1
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.CoreCompileInputs.cache View File

1
-62f47f122ed5bba33de470ff262dff7385a93a56
1
+5beca6072c8a7f6b59f92a3dc32c31511abdb816

+ 11
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.FileListAbsolute.txt View File

34
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.pdb
34
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.pdb
35
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll.config
35
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll.config
36
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache
36
 F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache
37
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll.config
38
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll
39
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.pdb
40
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\bin\Debug\gmap.dll
41
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\bin\Debug\gmdb.dll
42
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.Form1.resources
43
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.GenerateResource.cache
44
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.CoreCompileInputs.cache
45
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.CopyComplete
46
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.dll
47
+F:\daima\Tools\加密后软件工具\CAD插件工具\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.pdb

BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.GenerateResource.cache View File


BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.dll View File


BIN
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.pdb View File


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


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

54
       <setting name="FCY" serializeAs="String">
54
       <setting name="FCY" serializeAs="String">
55
         <value>复查员 </value>
55
         <value>复查员 </value>
56
       </setting>
56
       </setting>
57
+      <setting name="Company" serializeAs="String">
58
+        <value>四川中水成勘院测绘工程有限责任公司</value>
59
+      </setting>
57
     </HCTools.Properties.Settings>
60
     </HCTools.Properties.Settings>
58
   </userSettings>
61
   </userSettings>
59
 </configuration>
62
 </configuration>

+ 1218
- 923
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs
File diff suppressed because it is too large
View File


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

3
 using GrxCAD.Geometry;
3
 using GrxCAD.Geometry;
4
 using System;
4
 using System;
5
 using System.Collections.Generic;
5
 using System.Collections.Generic;
6
+using System.Diagnostics;
6
 using System.Linq;
7
 using System.Linq;
7
 using System.Text;
8
 using System.Text;
8
 using System.Threading.Tasks;
9
 using System.Threading.Tasks;
13
     // 存储交点和对应等高线的数据结构
14
     // 存储交点和对应等高线的数据结构
14
     class IntersectionResult
15
     class IntersectionResult
15
     {
16
     {
16
-        public Point3dCollection IntersectionPoint { get; set; }
17
+        public List<Point3d> IntersectionPoint { get; set; }
17
         public Polyline Contour { get; set; }
18
         public Polyline Contour { get; set; }
18
 
19
 
19
     }
20
     }
24
         public static string jqx;//计曲线
25
         public static string jqx;//计曲线
25
         public static int dgj;//计曲线
26
         public static int dgj;//计曲线
26
         public static string elevationLayer;//高程点图层名
27
         public static string elevationLayer;//高程点图层名
28
+        public static int num = 0;//点线矛盾点数量
27
         int looptimes = 5;//循环查找次数
29
         int looptimes = 5;//循环查找次数
28
 
30
 
31
+
29
         public void Check()
32
         public void Check()
30
         {
33
         {
31
             Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
34
             Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
32
             Database db = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database;
35
             Database db = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database;
36
+            num = 0;
33
 
37
 
34
             var ptlist = GetPt(ed, db);
38
             var ptlist = GetPt(ed, db);
35
             for (int i = 0; i < ptlist.Count; i++)
39
             for (int i = 0; i < ptlist.Count; i++)
37
                 BlockReference bf = ptlist[i];
41
                 BlockReference bf = ptlist[i];
38
                 //为方便搜索操作,将待检查高程点设置为当前视图的中心点,视图高设置为600
42
                 //为方便搜索操作,将待检查高程点设置为当前视图的中心点,视图高设置为600
39
                 SetWindow(ed, db, bf.Position.X, bf.Position.Y, 600, 600);
43
                 SetWindow(ed, db, bf.Position.X, bf.Position.Y, 600, 600);
40
-                bool contradition = false;
44
+                bool contradition = true;
41
                 for (int j = 0; j < looptimes; j++)
45
                 for (int j = 0; j < looptimes; j++)
42
                 {
46
                 {
43
-                    double searchlength = 50.0 * (looptimes + 1);
47
+                    double searchlength = 100.0 * (j + 1);
44
                     var searchpl_horizontal = SearchDGX(bf.Position, searchlength, ed, db, 0);
48
                     var searchpl_horizontal = SearchDGX(bf.Position, searchlength, ed, db, 0);
45
                     var searchpl_vertical = SearchDGX(bf.Position, searchlength, ed, db, 1);
49
                     var searchpl_vertical = SearchDGX(bf.Position, searchlength, ed, db, 1);
46
                     List<Polyline> all_pl = new List<Polyline>();
50
                     List<Polyline> all_pl = new List<Polyline>();
60
                 }
64
                 }
61
                 if (contradition)
65
                 if (contradition)
62
                 {
66
                 {
67
+                    num++;
63
                     MakeFlag(bf.Position, blc);
68
                     MakeFlag(bf.Position, blc);
64
 
69
 
65
                     Point3d p1 = new Point3d(bf.Position.X - 4 * blc / 2000, bf.Position.Y - 4 * blc / 2000, 0);
70
                     Point3d p1 = new Point3d(bf.Position.X - 4 * blc / 2000, bf.Position.Y - 4 * blc / 2000, 0);
96
                                     }
101
                                     }
97
                                 }
102
                                 }
98
                             }
103
                             }
99
-                        } 
104
+                        }
100
 
105
 
101
                         BlockReference blcref = (BlockReference)tr.GetObject(bf.ObjectId, OpenMode.ForWrite);
106
                         BlockReference blcref = (BlockReference)tr.GetObject(bf.ObjectId, OpenMode.ForWrite);
102
                         blcref.Layer = "点线矛盾高程点图层";
107
                         blcref.Layer = "点线矛盾高程点图层";
205
         }
210
         }
206
 
211
 
207
         //检查是否有点线矛盾
212
         //检查是否有点线矛盾
208
-        private bool IfContradition(List<Polyline> pllist,Point3d pt,double length)
213
+        private bool IfContradition(List<Polyline> pllist, Point3d pt, double length)
209
         {
214
         {
210
             var result = new List<List<IntersectionResult>>();
215
             var result = new List<List<IntersectionResult>>();
211
 
216
 
236
                 temppl.IntersectWith(searchline2, Intersect.OnBothOperands, plane, vertical_pt, IntPtr.Zero, IntPtr.Zero);
241
                 temppl.IntersectWith(searchline2, Intersect.OnBothOperands, plane, vertical_pt, IntPtr.Zero, IntPtr.Zero);
237
 
242
 
238
                 Matrix3d inverseMatrix = Matrix3d.Displacement(-translation);
243
                 Matrix3d inverseMatrix = Matrix3d.Displacement(-translation);
239
-                Point3dCollection horizontal_pt_transformed = new Point3dCollection();
240
-                Point3dCollection vertical_pt_transformed = new Point3dCollection();
241
-                if (horizontal_pt.Count!=0)
244
+                var horizontal_pt_transformed = new List<Point3d>();
245
+                var vertical_pt_transformed = new List<Point3d>();
246
+                if (horizontal_pt.Count != 0)
242
                 {
247
                 {
243
                     foreach (Point3d ptitem in horizontal_pt)
248
                     foreach (Point3d ptitem in horizontal_pt)
244
                         horizontal_pt_transformed.Add(ptitem.TransformBy(inverseMatrix));
249
                         horizontal_pt_transformed.Add(ptitem.TransformBy(inverseMatrix));
260
             //搜索是否有相应高程的等高线
265
             //搜索是否有相应高程的等高线
261
             bool hastarget_horizontal = horizontal.Any(item => Math.Round(item.Contour.Elevation - ele1, db.Luprec) == 0) &&
266
             bool hastarget_horizontal = horizontal.Any(item => Math.Round(item.Contour.Elevation - ele1, db.Luprec) == 0) &&
262
                                         horizontal.Any(item => Math.Round(item.Contour.Elevation - ele2, db.Luprec) == 0);
267
                                         horizontal.Any(item => Math.Round(item.Contour.Elevation - ele2, db.Luprec) == 0);
263
-            bool hastarget_vertical = vertical.Any(item => Math.Round(item.Contour.Elevation - ele1, db.Luprec) == 0)&&
268
+            bool hastarget_vertical = vertical.Any(item => Math.Round(item.Contour.Elevation - ele1, db.Luprec) == 0) &&
264
                                       vertical.Any(item => Math.Round(item.Contour.Elevation - ele2, db.Luprec) == 0);
269
                                       vertical.Any(item => Math.Round(item.Contour.Elevation - ele2, db.Luprec) == 0);
265
 
270
 
266
             //如果有,则判断高程点是否在两线之间,
271
             //如果有,则判断高程点是否在两线之间,
315
                 if (horizontal.Count >= 2)
320
                 if (horizontal.Count >= 2)
316
                 {
321
                 {
317
                     List<Point3d> pts = new List<Point3d>();
322
                     List<Point3d> pts = new List<Point3d>();
323
+                    //将高程点左右的线分开,分别放到两个list
324
+                    var side1 = new List<Point3d>();
325
+                    var side2 = new List<Point3d>();
318
                     foreach (var item in horizontal)
326
                     foreach (var item in horizontal)
319
                     {
327
                     {
320
-                        foreach (Point3d p in item.IntersectionPoint)
328
+                        foreach (var p in item.IntersectionPoint)
321
                         {
329
                         {
322
-                            pts.Add(p);
330
+                            if (Math.Sign(pt.X - p.X) > 0 & !side1.Contains(p) && !side2.Contains(p))
331
+                                side1.Add(p);
332
+                            else if (Math.Sign(pt.X - p.X) < 0 & !side1.Contains(p) && !side2.Contains(p))
333
+                                side2.Add(p);
334
+                            else
335
+                                continue;
323
                         }
336
                         }
324
                     }
337
                     }
325
-                    var pts_sorted = pts.OrderBy(p => p.DistanceTo(pt));
338
+                    //如果左右各有一条等高线,由于左右的等高线高程不是需要的高程所以为异常点
339
+                    if (side1.Count == 1 && side2.Count == 1)
340
+                        return true;
341
+                    var largerList = side1.Count >= side2.Count ? side1 : side2;
342
+                    var pts_sorted = largerList.OrderBy(p => p.DistanceTo(pt));
326
                     Point3d point = new Point3d();
343
                     Point3d point = new Point3d();
327
                     Polyline pl = new Polyline();
344
                     Polyline pl = new Polyline();
328
                     foreach (var item in pts_sorted)
345
                     foreach (var item in pts_sorted)
331
                         {
348
                         {
332
                             point = item;
349
                             point = item;
333
                             pl = horizontal.Find(p => p.IntersectionPoint.Contains(item)).Contour;
350
                             pl = horizontal.Find(p => p.IntersectionPoint.Contains(item)).Contour;
351
+                            if (Math.Abs(pt.Z - pl.Elevation) > dgj)
352
+                                return true;
334
                         }
353
                         }
335
                         else
354
                         else
336
                         {
355
                         {
351
                 if (vertical.Count >= 2)
370
                 if (vertical.Count >= 2)
352
                 {
371
                 {
353
                     List<Point3d> pts = new List<Point3d>();
372
                     List<Point3d> pts = new List<Point3d>();
373
+                    var side1 = new List<Point3d>();
374
+                    var side2 = new List<Point3d>();
354
                     foreach (var item in vertical)
375
                     foreach (var item in vertical)
355
                     {
376
                     {
356
-                        foreach (Point3d p in item.IntersectionPoint)
377
+                        foreach (var p in item.IntersectionPoint)
357
                         {
378
                         {
358
-                            pts.Add(p);
379
+                            if (Math.Sign(pt.Y - p.Y) > 0 & !side1.Contains(p) && !side2.Contains(p))
380
+                                side1.Add(p);
381
+                            else if (Math.Sign(pt.Y - p.Y) < 0 & !side1.Contains(p) && !side2.Contains(p))
382
+                                side2.Add(p);
383
+                            else
384
+                                continue;
359
                         }
385
                         }
360
                     }
386
                     }
361
-                    var pts_sorted = pts.OrderBy(p => p.DistanceTo(pt));
387
+                    if (side1.Count == 1 && side2.Count == 1)
388
+                        return true;
389
+                    var largerList = side1.Count >= side2.Count ? side1 : side2;
390
+                    var pts_sorted = largerList.OrderBy(p => p.DistanceTo(pt));
362
                     Point3d point = new Point3d();
391
                     Point3d point = new Point3d();
363
                     Polyline pl = new Polyline();
392
                     Polyline pl = new Polyline();
364
                     foreach (var item in pts_sorted)
393
                     foreach (var item in pts_sorted)
367
                         {
396
                         {
368
                             point = item;
397
                             point = item;
369
                             pl = vertical.Find(p => p.IntersectionPoint.Contains(item)).Contour;
398
                             pl = vertical.Find(p => p.IntersectionPoint.Contains(item)).Contour;
399
+                            if (Math.Abs(pt.Z - pl.Elevation) > dgj)
400
+                                return true;
370
                         }
401
                         }
371
                         else
402
                         else
372
                         {
403
                         {

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

155
                 this["FCY"] = value;
155
                 this["FCY"] = value;
156
             }
156
             }
157
         }
157
         }
158
+        
159
+        [global::System.Configuration.UserScopedSettingAttribute()]
160
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
161
+        [global::System.Configuration.DefaultSettingValueAttribute("四川中水成勘院测绘工程有限责任公司")]
162
+        public string Company {
163
+            get {
164
+                return ((string)(this["Company"]));
165
+            }
166
+            set {
167
+                this["Company"] = value;
168
+            }
169
+        }
158
     }
170
     }
159
 }
171
 }

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

38
     <Setting Name="FCY" Type="System.String" Scope="User">
38
     <Setting Name="FCY" Type="System.String" Scope="User">
39
       <Value Profile="(Default)">复查员 </Value>
39
       <Value Profile="(Default)">复查员 </Value>
40
     </Setting>
40
     </Setting>
41
+    <Setting Name="Company" Type="System.String" Scope="User">
42
+      <Value Profile="(Default)">四川中水成勘院测绘工程有限责任公司</Value>
43
+    </Setting>
41
   </Settings>
44
   </Settings>
42
 </SettingsFile>
45
 </SettingsFile>

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

110
             ChPLContradiction1 chplc = new ChPLContradiction1();
110
             ChPLContradiction1 chplc = new ChPLContradiction1();
111
             chplc.Check();
111
             chplc.Check();
112
             this.Close();
112
             this.Close();
113
-            MessageBox.Show("点线矛盾检查完成。");
113
+            MessageBox.Show("点线矛盾检查完成。\n共有"+ ChPLContradiction1.num + "个异常点。");
114
         }
114
         }
115
 
115
 
116
         private void btn_Cancel_Click(object sender, EventArgs e)
116
         private void btn_Cancel_Click(object sender, EventArgs e)

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

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.textBox_FCY = new System.Windows.Forms.TextBox();
52
+            this.label3 = new System.Windows.Forms.Label();
53
+            this.textBox_Company = new System.Windows.Forms.TextBox();
52
             this.SuspendLayout();
54
             this.SuspendLayout();
53
             // 
55
             // 
54
             // label_blc_TK
56
             // label_blc_TK
55
             // 
57
             // 
56
             this.label_blc_TK.AutoSize = true;
58
             this.label_blc_TK.AutoSize = true;
57
-            this.label_blc_TK.Location = new System.Drawing.Point(304, 335);
59
+            this.label_blc_TK.Location = new System.Drawing.Point(304, 383);
58
             this.label_blc_TK.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
60
             this.label_blc_TK.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
59
             this.label_blc_TK.Name = "label_blc_TK";
61
             this.label_blc_TK.Name = "label_blc_TK";
60
             this.label_blc_TK.Size = new System.Drawing.Size(52, 15);
62
             this.label_blc_TK.Size = new System.Drawing.Size(52, 15);
68
             this.comboBox_BLC1.Items.AddRange(new object[] {
70
             this.comboBox_BLC1.Items.AddRange(new object[] {
69
             "1:500",
71
             "1:500",
70
             "1:1000",
72
             "1:1000",
71
-            "1:2000"});
72
-            this.comboBox_BLC1.Location = new System.Drawing.Point(364, 332);
73
+            "1:2000",
74
+            "1:5000"});
75
+            this.comboBox_BLC1.Location = new System.Drawing.Point(364, 380);
73
             this.comboBox_BLC1.Margin = new System.Windows.Forms.Padding(4);
76
             this.comboBox_BLC1.Margin = new System.Windows.Forms.Padding(4);
74
             this.comboBox_BLC1.Name = "comboBox_BLC1";
77
             this.comboBox_BLC1.Name = "comboBox_BLC1";
75
             this.comboBox_BLC1.Size = new System.Drawing.Size(166, 23);
78
             this.comboBox_BLC1.Size = new System.Drawing.Size(166, 23);
77
             // 
80
             // 
78
             // textBox_DH
81
             // textBox_DH
79
             // 
82
             // 
80
-            this.textBox_DH.Location = new System.Drawing.Point(131, 330);
83
+            this.textBox_DH.Location = new System.Drawing.Point(131, 378);
81
             this.textBox_DH.Margin = new System.Windows.Forms.Padding(4);
84
             this.textBox_DH.Margin = new System.Windows.Forms.Padding(4);
82
             this.textBox_DH.Name = "textBox_DH";
85
             this.textBox_DH.Name = "textBox_DH";
83
             this.textBox_DH.Size = new System.Drawing.Size(156, 25);
86
             this.textBox_DH.Size = new System.Drawing.Size(156, 25);
85
             // 
88
             // 
86
             // textBox_JCY
89
             // textBox_JCY
87
             // 
90
             // 
88
-            this.textBox_JCY.Location = new System.Drawing.Point(309, 220);
91
+            this.textBox_JCY.Location = new System.Drawing.Point(309, 268);
89
             this.textBox_JCY.Margin = new System.Windows.Forms.Padding(4);
92
             this.textBox_JCY.Margin = new System.Windows.Forms.Padding(4);
90
             this.textBox_JCY.Name = "textBox_JCY";
93
             this.textBox_JCY.Name = "textBox_JCY";
91
             this.textBox_JCY.Size = new System.Drawing.Size(223, 25);
94
             this.textBox_JCY.Size = new System.Drawing.Size(223, 25);
94
             // 
97
             // 
95
             // textBox_SHY
98
             // textBox_SHY
96
             // 
99
             // 
97
-            this.textBox_SHY.Location = new System.Drawing.Point(309, 258);
100
+            this.textBox_SHY.Location = new System.Drawing.Point(309, 306);
98
             this.textBox_SHY.Margin = new System.Windows.Forms.Padding(4);
101
             this.textBox_SHY.Margin = new System.Windows.Forms.Padding(4);
99
             this.textBox_SHY.Name = "textBox_SHY";
102
             this.textBox_SHY.Name = "textBox_SHY";
100
             this.textBox_SHY.Size = new System.Drawing.Size(223, 25);
103
             this.textBox_SHY.Size = new System.Drawing.Size(223, 25);
103
             // 
106
             // 
104
             // textBox_TDY
107
             // textBox_TDY
105
             // 
108
             // 
106
-            this.textBox_TDY.Location = new System.Drawing.Point(76, 258);
109
+            this.textBox_TDY.Location = new System.Drawing.Point(76, 306);
107
             this.textBox_TDY.Margin = new System.Windows.Forms.Padding(4);
110
             this.textBox_TDY.Margin = new System.Windows.Forms.Padding(4);
108
             this.textBox_TDY.Name = "textBox_TDY";
111
             this.textBox_TDY.Name = "textBox_TDY";
109
             this.textBox_TDY.Size = new System.Drawing.Size(213, 25);
112
             this.textBox_TDY.Size = new System.Drawing.Size(213, 25);
112
             // 
115
             // 
113
             // textBox_CTY
116
             // textBox_CTY
114
             // 
117
             // 
115
-            this.textBox_CTY.Location = new System.Drawing.Point(76, 220);
118
+            this.textBox_CTY.Location = new System.Drawing.Point(76, 268);
116
             this.textBox_CTY.Margin = new System.Windows.Forms.Padding(4);
119
             this.textBox_CTY.Margin = new System.Windows.Forms.Padding(4);
117
             this.textBox_CTY.Name = "textBox_CTY";
120
             this.textBox_CTY.Name = "textBox_CTY";
118
             this.textBox_CTY.Size = new System.Drawing.Size(213, 25);
121
             this.textBox_CTY.Size = new System.Drawing.Size(213, 25);
121
             // 
124
             // 
122
             // richTextBox1
125
             // richTextBox1
123
             // 
126
             // 
124
-            this.richTextBox1.Location = new System.Drawing.Point(102, 68);
127
+            this.richTextBox1.Location = new System.Drawing.Point(102, 116);
125
             this.richTextBox1.Margin = new System.Windows.Forms.Padding(4);
128
             this.richTextBox1.Margin = new System.Windows.Forms.Padding(4);
126
             this.richTextBox1.Name = "richTextBox1";
129
             this.richTextBox1.Name = "richTextBox1";
127
             this.richTextBox1.Size = new System.Drawing.Size(414, 133);
130
             this.richTextBox1.Size = new System.Drawing.Size(414, 133);
131
             // label_Rich
134
             // label_Rich
132
             // 
135
             // 
133
             this.label_Rich.AutoSize = true;
136
             this.label_Rich.AutoSize = true;
134
-            this.label_Rich.Location = new System.Drawing.Point(57, 75);
137
+            this.label_Rich.Location = new System.Drawing.Point(57, 123);
135
             this.label_Rich.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
138
             this.label_Rich.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
136
             this.label_Rich.Name = "label_Rich";
139
             this.label_Rich.Name = "label_Rich";
137
             this.label_Rich.Size = new System.Drawing.Size(37, 15);
140
             this.label_Rich.Size = new System.Drawing.Size(37, 15);
158
             // 
161
             // 
159
             // btn_Cancel
162
             // btn_Cancel
160
             // 
163
             // 
161
-            this.btn_Cancel.Location = new System.Drawing.Point(321, 449);
164
+            this.btn_Cancel.Location = new System.Drawing.Point(321, 497);
162
             this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
165
             this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
163
             this.btn_Cancel.Name = "btn_Cancel";
166
             this.btn_Cancel.Name = "btn_Cancel";
164
             this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
167
             this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
169
             // 
172
             // 
170
             // btn_OK
173
             // btn_OK
171
             // 
174
             // 
172
-            this.btn_OK.Location = new System.Drawing.Point(170, 448);
175
+            this.btn_OK.Location = new System.Drawing.Point(170, 496);
173
             this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
176
             this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
174
             this.btn_OK.Name = "btn_OK";
177
             this.btn_OK.Name = "btn_OK";
175
             this.btn_OK.Size = new System.Drawing.Size(100, 29);
178
             this.btn_OK.Size = new System.Drawing.Size(100, 29);
181
             // label1
184
             // label1
182
             // 
185
             // 
183
             this.label1.AutoSize = true;
186
             this.label1.AutoSize = true;
184
-            this.label1.Location = new System.Drawing.Point(47, 407);
187
+            this.label1.Location = new System.Drawing.Point(47, 455);
185
             this.label1.Name = "label1";
188
             this.label1.Name = "label1";
186
             this.label1.Size = new System.Drawing.Size(82, 15);
189
             this.label1.Size = new System.Drawing.Size(82, 15);
187
             this.label1.TabIndex = 110;
190
             this.label1.TabIndex = 110;
189
             // 
192
             // 
190
             // textBox_savepath
193
             // textBox_savepath
191
             // 
194
             // 
192
-            this.textBox_savepath.Location = new System.Drawing.Point(135, 404);
195
+            this.textBox_savepath.Location = new System.Drawing.Point(135, 452);
193
             this.textBox_savepath.Name = "textBox_savepath";
196
             this.textBox_savepath.Name = "textBox_savepath";
194
             this.textBox_savepath.Size = new System.Drawing.Size(304, 25);
197
             this.textBox_savepath.Size = new System.Drawing.Size(304, 25);
195
             this.textBox_savepath.TabIndex = 111;
198
             this.textBox_savepath.TabIndex = 111;
196
             // 
199
             // 
197
             // button_chse
200
             // button_chse
198
             // 
201
             // 
199
-            this.button_chse.Location = new System.Drawing.Point(455, 400);
202
+            this.button_chse.Location = new System.Drawing.Point(455, 448);
200
             this.button_chse.Name = "button_chse";
203
             this.button_chse.Name = "button_chse";
201
             this.button_chse.Size = new System.Drawing.Size(75, 29);
204
             this.button_chse.Size = new System.Drawing.Size(75, 29);
202
             this.button_chse.TabIndex = 112;
205
             this.button_chse.TabIndex = 112;
207
             // label_DH
210
             // label_DH
208
             // 
211
             // 
209
             this.label_DH.AutoSize = true;
212
             this.label_DH.AutoSize = true;
210
-            this.label_DH.Location = new System.Drawing.Point(71, 338);
213
+            this.label_DH.Location = new System.Drawing.Point(71, 386);
211
             this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
214
             this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
212
             this.label_DH.Name = "label_DH";
215
             this.label_DH.Name = "label_DH";
213
             this.label_DH.Size = new System.Drawing.Size(37, 15);
216
             this.label_DH.Size = new System.Drawing.Size(37, 15);
217
             // label2
220
             // label2
218
             // 
221
             // 
219
             this.label2.AutoSize = true;
222
             this.label2.AutoSize = true;
220
-            this.label2.Location = new System.Drawing.Point(49, 371);
223
+            this.label2.Location = new System.Drawing.Point(49, 419);
221
             this.label2.Name = "label2";
224
             this.label2.Name = "label2";
222
             this.label2.Size = new System.Drawing.Size(187, 15);
225
             this.label2.Size = new System.Drawing.Size(187, 15);
223
             this.label2.TabIndex = 113;
226
             this.label2.TabIndex = 113;
225
             // 
228
             // 
226
             // textBox_secret
229
             // textBox_secret
227
             // 
230
             // 
228
-            this.textBox_secret.Location = new System.Drawing.Point(242, 368);
231
+            this.textBox_secret.Location = new System.Drawing.Point(242, 416);
229
             this.textBox_secret.Name = "textBox_secret";
232
             this.textBox_secret.Name = "textBox_secret";
230
             this.textBox_secret.Size = new System.Drawing.Size(151, 25);
233
             this.textBox_secret.Size = new System.Drawing.Size(151, 25);
231
             this.textBox_secret.TabIndex = 114;
234
             this.textBox_secret.TabIndex = 114;
232
             // 
235
             // 
233
             // textBox_FCY
236
             // textBox_FCY
234
             // 
237
             // 
235
-            this.textBox_FCY.Location = new System.Drawing.Point(76, 297);
238
+            this.textBox_FCY.Location = new System.Drawing.Point(76, 345);
236
             this.textBox_FCY.Margin = new System.Windows.Forms.Padding(4);
239
             this.textBox_FCY.Margin = new System.Windows.Forms.Padding(4);
237
             this.textBox_FCY.Name = "textBox_FCY";
240
             this.textBox_FCY.Name = "textBox_FCY";
238
             this.textBox_FCY.Size = new System.Drawing.Size(213, 25);
241
             this.textBox_FCY.Size = new System.Drawing.Size(213, 25);
239
             this.textBox_FCY.TabIndex = 115;
242
             this.textBox_FCY.TabIndex = 115;
240
             this.textBox_FCY.Text = "复查员 ";
243
             this.textBox_FCY.Text = "复查员 ";
241
             // 
244
             // 
245
+            // label3
246
+            // 
247
+            this.label3.AutoSize = true;
248
+            this.label3.Location = new System.Drawing.Point(29, 79);
249
+            this.label3.Name = "label3";
250
+            this.label3.Size = new System.Drawing.Size(67, 15);
251
+            this.label3.TabIndex = 116;
252
+            this.label3.Text = "公司名:";
253
+            // 
254
+            // textBox_Company
255
+            // 
256
+            this.textBox_Company.Location = new System.Drawing.Point(102, 76);
257
+            this.textBox_Company.Name = "textBox_Company";
258
+            this.textBox_Company.Size = new System.Drawing.Size(414, 25);
259
+            this.textBox_Company.TabIndex = 117;
260
+            // 
242
             // TKInfo
261
             // TKInfo
243
             // 
262
             // 
244
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
263
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
245
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
264
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
246
-            this.ClientSize = new System.Drawing.Size(610, 510);
265
+            this.ClientSize = new System.Drawing.Size(610, 556);
266
+            this.Controls.Add(this.textBox_Company);
267
+            this.Controls.Add(this.label3);
247
             this.Controls.Add(this.textBox_FCY);
268
             this.Controls.Add(this.textBox_FCY);
248
             this.Controls.Add(this.textBox_secret);
269
             this.Controls.Add(this.textBox_secret);
249
             this.Controls.Add(this.label2);
270
             this.Controls.Add(this.label2);
294
         private System.Windows.Forms.Label label2;
315
         private System.Windows.Forms.Label label2;
295
         private System.Windows.Forms.TextBox textBox_secret;
316
         private System.Windows.Forms.TextBox textBox_secret;
296
         private System.Windows.Forms.TextBox textBox_FCY;
317
         private System.Windows.Forms.TextBox textBox_FCY;
318
+        private System.Windows.Forms.Label label3;
319
+        private System.Windows.Forms.TextBox textBox_Company;
297
     }
320
     }
298
 }
321
 }

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

29
         public static string SV = "";
29
         public static string SV = "";
30
         public static int DH = -1;
30
         public static int DH = -1;
31
         public static string Secret = "";
31
         public static string Secret = "";
32
+        public static string Company = "";
32
 
33
 
33
         public static int BLC = 2000;
34
         public static int BLC = 2000;
34
         //public static string ConstLine1 = "GB/T20257.1-2007国家基本比例尺地图图式 第一部分:";
35
         //public static string ConstLine1 = "GB/T20257.1-2007国家基本比例尺地图图式 第一部分:";
54
             this.textBox_FCY.Text = Properties.Settings.Default.FCY;
55
             this.textBox_FCY.Text = Properties.Settings.Default.FCY;
55
             this.textBox_DH.Text = Properties.Settings.Default.DH.ToString();
56
             this.textBox_DH.Text = Properties.Settings.Default.DH.ToString();
56
             this.textBox_secret.Text = Properties.Settings.Default.secret.ToString();
57
             this.textBox_secret.Text = Properties.Settings.Default.secret.ToString();
58
+            this.textBox_Company.Text = Properties.Settings.Default.Company.ToString();
57
             textBox_savepath.Text = Properties.Settings.Default.svpath;
59
             textBox_savepath.Text = Properties.Settings.Default.svpath;
58
         }
60
         }
59
 
61
 
84
             FCY = this.textBox_FCY.Text;
86
             FCY = this.textBox_FCY.Text;
85
             SV = textBox_savepath.Text;
87
             SV = textBox_savepath.Text;
86
             Secret = textBox_secret.Text;
88
             Secret = textBox_secret.Text;
89
+            Company = textBox_Company.Text;
90
+
87
 
91
 
88
             if (string.IsNullOrEmpty(textBox_DH.Text.Trim()) == false)
92
             if (string.IsNullOrEmpty(textBox_DH.Text.Trim()) == false)
89
             {
93
             {
98
             {
102
             {
99
                 BLC = 1000;
103
                 BLC = 1000;
100
             }
104
             }
101
-            else
105
+            else if (comboBox_BLC1.SelectedIndex == 2)
102
             {
106
             {
103
                 BLC = 2000;
107
                 BLC = 2000;
104
             }
108
             }
109
+            else if (comboBox_BLC1.SelectedIndex == 3)
110
+            {
111
+                BLC = 5000;
112
+            }
105
 
113
 
106
             //界面最小化
114
             //界面最小化
107
             this.Close();
115
             this.Close();
118
             Properties.Settings.Default.DH = DH;
126
             Properties.Settings.Default.DH = DH;
119
             Properties.Settings.Default.svpath = SV;
127
             Properties.Settings.Default.svpath = SV;
120
             Properties.Settings.Default.secret = Secret;
128
             Properties.Settings.Default.secret = Secret;
129
+            Properties.Settings.Default.Company = Company;
121
             Properties.Settings.Default.Save();
130
             Properties.Settings.Default.Save();
122
             MessageBox.Show("生成完毕");
131
             MessageBox.Show("生成完毕");
123
         }
132
         }

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


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

54
       <setting name="FCY" serializeAs="String">
54
       <setting name="FCY" serializeAs="String">
55
         <value>复查员 </value>
55
         <value>复查员 </value>
56
       </setting>
56
       </setting>
57
+      <setting name="Company" serializeAs="String">
58
+        <value>四川中水成勘院测绘工程有限责任公司</value>
59
+      </setting>
57
     </HCTools.Properties.Settings>
60
     </HCTools.Properties.Settings>
58
   </userSettings>
61
   </userSettings>
59
 </configuration>
62
 </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.CutCountL.resources View File


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


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