public void TcDDX2() { this.double_0 = CAD.GetScale(); this.point3d_0 = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(this.point3d_0 == point3d)) { ObjectId[] array = new ObjectId[7]; Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { array[0] = CAD.AddEnt(this.entity_0[0]).ObjectId; array[1] = CAD.AddEnt(this.entity_0[1]).ObjectId; array[2] = CAD.AddEnt(this.entity_0[2]).ObjectId; array[3] = CAD.AddEnt(this.entity_0[3]).ObjectId; array[4] = CAD.AddEnt(this.entity_0[4]).ObjectId; array[5] = CAD.AddEnt(this.entity_0[5]).ObjectId; array[6] = CAD.AddEnt(this.entity_0[6]).ObjectId; Class36.smethod_55(array); } } }
public void TcZhuShi3() { CAD.CreateLayer("注释", 1, "continuous", 30, false, false); Application.SetSystemVariable("LWDISPLAY", 1); Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; this.point3d_0 = CAD.GetPoint("箭头起始点:"); Point3d point3d; if (this.point3d_0 != point3d) { PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { this.point3d_0 = this.point3d_1; this.bool_0 = false; } promptResult = editor.Drag(this); if (promptResult.Status == 5100) { CAD.AddEnt(this.entity_0[0]); this.bool_0 = true; } } }
public Entity CG(double B, double H, double D, double T, double R) { Point3d point3d; point3d..ctor(0.0, 0.0, 0.0); double num = T - (B - D) / 2.0 / 10.0; double num2 = num / Math.Tan(1.5707963267948966 - (1.5707963267948966 + Math.Atan(0.1)) / 2.0); double num3 = num2 * (1.0 - Math.Cos(Math.Atan(10.0))); double num4 = num2 * (double)Math.Sign(Math.Atan(10.0)); double num5 = R / Math.Tan((1.5707963267948966 + Math.Atan(0.1)) / 2.0); Point2d point2d; point2d..ctor(point3d.get_Coordinate(0), point3d.get_Coordinate(1)); Point2d point2d2; point2d2..ctor(point3d.get_Coordinate(0) + B, point3d.get_Coordinate(1)); Point2d point2d3; point2d3..ctor(point3d.get_Coordinate(0) + B - num3, point3d.get_Coordinate(1) + num4); Point2d point2d4; point2d4..ctor(point2d3.X - (B - D - num3 - num5 * Math.Cos(Math.Atan(0.1))), point2d3.Y + (B - D - num3 - num5 * Math.Cos(Math.Atan(0.1))) / 10.0); Point2d point2d5; point2d5..ctor(point2d4.X - num5 * Math.Cos(Math.Atan(0.1)), point2d4.Y + num5 * Math.Sin(Math.Atan(0.1)) + num5); Point2d point2d6; point2d6..ctor(point2d5.X, point2d5.Y + (H - (point2d5.Y - point2d.Y) * 2.0)); Point2d point2d7; point2d7..ctor(point2d4.X, point2d6.Y + num5 + num5 * Math.Sin(Math.Atan(0.1))); Point2d point2d8; point2d8..ctor(point3d.get_Coordinate(0) + B - num3, point3d.get_Coordinate(1) + H - num4); Point2d point2d9; point2d9..ctor(point3d.get_Coordinate(0) + B, point3d.get_Coordinate(1) + H); Point2d point2d10; point2d10..ctor(point3d.get_Coordinate(0), point3d.get_Coordinate(1) + H); Polyline polyline = new Polyline(); polyline.AddVertexAt(0, point2d, 0.0, 0.0, 0.0); polyline.AddVertexAt(1, point2d2, Math.Tan((1.5707963267948966 - Math.Atan(0.1)) / 4.0), 0.0, 0.0); polyline.AddVertexAt(2, point2d3, 0.0, 0.0, 0.0); polyline.AddVertexAt(3, point2d4, -Math.Tan((1.5707963267948966 - Math.Atan(0.1)) / 4.0), 0.0, 0.0); polyline.AddVertexAt(4, point2d5, 0.0, 0.0, 0.0); polyline.AddVertexAt(5, point2d6, -Math.Tan((1.5707963267948966 - Math.Atan(0.1)) / 4.0), 0.0, 0.0); polyline.AddVertexAt(6, point2d7, 0.0, 0.0, 0.0); polyline.AddVertexAt(7, point2d8, Math.Tan((1.5707963267948966 - Math.Atan(0.1)) / 4.0), 0.0, 0.0); polyline.AddVertexAt(8, point2d9, 0.0, 0.0, 0.0); polyline.AddVertexAt(9, point2d10, 0.0, 0.0, 0.0); polyline.Closed = true; CAD.AddEnt(polyline); return(polyline); }
public void ChengTai3() { ObjectIdCollection objectIdCollection = new ObjectIdCollection(); Point3d point = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(point == point3d)) { objectIdCollection.Add(CAD.AddPoint(point)); long num = Conversions.ToLong(Interaction.InputBox("输入桩直径或边长", "三桩承台", "400", -1, -1)); long num2 = Conversions.ToLong(Interaction.InputBox("输入桩中心距(mm)", "三桩承台", "1400", -1, -1)); Point3d pointAngle = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, 90.0); objectIdCollection.Add(CAD.AddPoint(pointAngle)); Point3d pointAngle2 = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, 210.0); objectIdCollection.Add(CAD.AddPoint(pointAngle2)); Point3d pointAngle3 = CAD.GetPointAngle(point, (double)num2 * Math.Sqrt(3.0) / 3.0, -30.0); objectIdCollection.Add(CAD.AddPoint(pointAngle3)); double r = 2.0 * Math.Sqrt(3.0) / 3.0 * (double)num; Point3d pointAngle4 = CAD.GetPointAngle(pointAngle, r, 60.0); Point3d pointAngle5 = CAD.GetPointAngle(pointAngle, r, 120.0); Point3d pointAngle6 = CAD.GetPointAngle(pointAngle2, r, 180.0); Point3d pointAngle7 = CAD.GetPointAngle(pointAngle2, r, 240.0); Point3d pointAngle8 = CAD.GetPointAngle(pointAngle3, r, 300.0); Point3d pointAngle9 = CAD.GetPointAngle(pointAngle3, r, 360.0); Polyline polyline = new Polyline(); Polyline polyline2 = polyline; int num3 = 0; Point2d point2d; point2d..ctor(pointAngle4.X, pointAngle4.Y); polyline2.AddVertexAt(num3, point2d, 0.0, 0.0, 0.0); Polyline polyline3 = polyline; int num4 = 1; point2d..ctor(pointAngle5.X, pointAngle5.Y); polyline3.AddVertexAt(num4, point2d, 0.0, 0.0, 0.0); Polyline polyline4 = polyline; int num5 = 2; point2d..ctor(pointAngle6.X, pointAngle6.Y); polyline4.AddVertexAt(num5, point2d, 0.0, 0.0, 0.0); Polyline polyline5 = polyline; int num6 = 3; point2d..ctor(pointAngle7.X, pointAngle7.Y); polyline5.AddVertexAt(num6, point2d, 0.0, 0.0, 0.0); Polyline polyline6 = polyline; int num7 = 4; point2d..ctor(pointAngle8.X, pointAngle8.Y); polyline6.AddVertexAt(num7, point2d, 0.0, 0.0, 0.0); Polyline polyline7 = polyline; int num8 = 5; point2d..ctor(pointAngle9.X, pointAngle9.Y); polyline7.AddVertexAt(num8, point2d, 0.0, 0.0, 0.0); polyline.Closed = true; objectIdCollection.Add(CAD.AddEnt(polyline).ObjectId); Class36.smethod_18(objectIdCollection); } }
private ObjectId method_1(Point3d point3d_0, string string_0, double double_0, double double_1 = 0.0) { return(CAD.AddEnt(new DBText { VerticalMode = 3, HorizontalMode = 1, AlignmentPoint = point3d_0, Rotation = double_1, TextString = string_0, TextStyleId = CAD.CreateTextStyle("宋体", "宋体", "", 0.7), Height = double_0 }).ObjectId); }
public void TcDKH() { this.point3d_0 = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(this.point3d_0 == point3d)) { Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { CAD.AddEnt(this.polyline_0); } } }
public void WallLine() { this.double_0 = Class36.smethod_30("指定墙体宽度(默认240):", 240.0); this.point3d_0 = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(this.point3d_0 == point3d)) { Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { CAD.AddEnt(this.entity_0[0]); CAD.AddEnt(this.entity_0[1]); } } }
public Entity JG(double B, double H, double D, double R) { Point3d point3d; point3d..ctor(0.0, 0.0, 0.0); Point2d point2d; point2d..ctor(point3d.get_Coordinate(0), point3d.get_Coordinate(1)); Point2d point2d2; point2d2..ctor(point3d.get_Coordinate(0) + B, point3d.get_Coordinate(1)); Point2d point2d3; point2d3..ctor(point3d.get_Coordinate(0) + B - D, point3d.get_Coordinate(1) + D); Point2d point2d4; point2d4..ctor(point3d.get_Coordinate(0) + D + R, point3d.get_Coordinate(1) + D); Point2d point2d5; point2d5..ctor(point3d.get_Coordinate(0) + D, point3d.get_Coordinate(1) + D + R); Point2d point2d6; point2d6..ctor(point3d.get_Coordinate(0) + D, point3d.get_Coordinate(1) + H - D); Point2d point2d7; point2d7..ctor(point3d.get_Coordinate(0), point3d.get_Coordinate(1) + H); Polyline polyline = new Polyline(); polyline.AddVertexAt(0, point2d, 0.0, 0.0, 0.0); polyline.AddVertexAt(1, point2d2, Math.Tan(0.39269908169872414), 0.0, 0.0); polyline.AddVertexAt(2, point2d3, 0.0, 0.0, 0.0); polyline.AddVertexAt(3, point2d4, -Math.Tan(0.39269908169872414), 0.0, 0.0); polyline.AddVertexAt(4, point2d5, 0.0, 0.0, 0.0); polyline.AddVertexAt(5, point2d6, Math.Tan(0.39269908169872414), 0.0, 0.0); polyline.AddVertexAt(6, point2d7, 0.0, 0.0, 0.0); polyline.Closed = true; CAD.AddEnt(polyline); return(polyline); }
public void TcZhuShi1() { Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; Point3d point3d; Point3d point3d2; short num = (-((Class36.smethod_33(ref point3d, ref point3d2) > false) ? 1 : 0)) ? 1 : 0; if (num != 0) { this.double_0 = Math.Abs(point3d.X - point3d2.X); this.double_1 = Math.Abs(point3d.Y - point3d2.Y); this.point3d_0..ctor((point3d.X + point3d2.X) / 2.0, (point3d.Y + point3d2.Y) / 2.0, 0.0); PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { CAD.AddEnt(this.entity_0[0]); CAD.AddEnt(this.entity_0[1]); this.dbtext_0 = new DBText(); this.dbtext_0.Height = Math.Min(0.7 * Math.Min(this.double_0, this.double_1), Math.Max(this.double_0, this.double_1) / 8.0); this.dbtext_0.WidthFactor = 0.7; this.dbtext_0.TextString = "请在这里输入内容"; if (this.double_0 < this.double_1) { this.dbtext_0.Rotation = 1.5707963267948966; } else { this.dbtext_0.Rotation = 0.0; } this.dbtext_0.SetDatabaseDefaults(); this.dbtext_0.HorizontalMode = 1; this.dbtext_0.VerticalMode = 2; this.dbtext_0.AlignmentPoint = this.point3d_0; CAD.AddEnt(this.dbtext_0); } } }
public void TcZhuShi2() { CAD.CreateLayer("注释", 1, "continuous", 30, false, false); Application.SetSystemVariable("LWDISPLAY", 1); Database workingDatabase = HostApplicationServices.WorkingDatabase; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; Point3d point3d; Point3d point3d2; short num = (-((Class36.smethod_33(ref point3d, ref point3d2) > false) ? 1 : 0)) ? 1 : 0; if (num != 0) { this.double_0 = Math.Abs(point3d.X - point3d2.X); this.double_1 = Math.Abs(point3d.Y - point3d2.Y); this.point3d_0..ctor((point3d.X + point3d2.X) / 2.0, (point3d.Y + point3d2.Y) / 2.0, 0.0); PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { CAD.AddEnt(this.entity_0[0]); this.dbtext_0 = new DBText(); double num2 = this.double_0 / 8.0; this.dbtext_0.TextString = "请在这里输入内容"; if (num2 > 0.7 * this.double_1) { this.dbtext_0.Height = 0.7 * this.double_1; } else { this.dbtext_0.Height = num2; } this.dbtext_0.SetDatabaseDefaults(); this.dbtext_0.HorizontalMode = 1; this.dbtext_0.VerticalMode = 2; this.dbtext_0.AlignmentPoint = this.point3d_0; CAD.AddEnt(this.dbtext_0); } } }
private ObjectId method_2(Point3d point3d_0, short short_0, short short_1) { Solid solid = new Solid(); solid.SetPointAt(0, point3d_0); Solid solid2 = solid; short num = 1; Point3d point3d; point3d..ctor(point3d_0.X, point3d_0.Y + (double)short_1, point3d_0.Z); solid2.SetPointAt(num, point3d); Solid solid3 = solid; short num2 = 2; point3d..ctor(point3d_0.X + (double)short_0, point3d_0.Y, point3d_0.Z); solid3.SetPointAt(num2, point3d); Solid solid4 = solid; short num3 = 3; point3d..ctor(point3d_0.X + (double)short_0, point3d_0.Y + (double)short_1, point3d_0.Z); solid4.SetPointAt(num3, point3d); CAD.AddEnt(solid); return(solid.ObjectId); }
public void TcGJHJ_LM2() { int num; int num3; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; this.double_0 = CAD.GetScale(); IL_16: num2 = 3; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_28: num2 = 4; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_3E; } IL_39: goto IL_1A3; IL_3E: num2 = 7; CAD.CreateLayer("钢筋桁架_LM_YJ", 14, "continuous", -1, false, true); IL_55: num2 = 8; CAD.CreateLayer("钢筋桁架", 14, "continuous", -1, false, true); IL_6C: num2 = 9; IL_6F: num2 = 10; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_78: num2 = 11; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_8B: num2 = 12; PromptResult promptResult = editor.Drag(this); IL_97: num2 = 13; if (promptResult.Status != 5100) { goto IL_F2; } IL_AA: num2 = 14; Line line = new Line(); IL_B3: num2 = 15; line.SetDatabaseDefaults(); IL_BC: num2 = 16; line.StartPoint = this.point3d_0; IL_CB: num2 = 17; line.EndPoint = this.point3d_1; IL_DA: num2 = 18; line.Layer = "钢筋桁架_LM_YJ"; IL_E8: num2 = 19; CAD.AddEnt(line); IL_F2: goto IL_1A3; IL_F7: goto IL_1AE; IL_FC: num3 = num2; if (num <= -2) { goto IL_114; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_17D; IL_114: int num4 = num3 + 1; num3 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num4); IL_17D: goto IL_1AE; } catch when(endfilter(obj is Exception & num != 0 & num3 == 0)) { Exception ex = (Exception)obj2; goto IL_FC; } IL_1A3: if (num3 != 0) { ProjectData.ClearProjectError(); } return; IL_1AE: throw ProjectData.CreateProjectError(-2146828237); }
public void TcLXYZ2() { int num; int num14; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; CAD.CreateLayer("Y_引注", 4, "continuous", -3, false, true); IL_20: num2 = 3; CAD.CreateLayer("Y_引线", 5, "continuous", 13, false, true); IL_37: num2 = 4; this.double_0 = CAD.GetScale(); IL_44: num2 = 5; bool flag = false; IL_48: num2 = 6; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_55: num2 = 7; Database database = mdiActiveDocument.Database; IL_5F: num2 = 8; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_72: num2 = 9; using (Transaction transaction = database.TransactionManager.StartTransaction()) { PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(); if (selection.Status == 5100) { SelectionSet value = selection.Value; Entity entity = (Entity)transaction.GetObject(value[0].ObjectId, 0); short num4; short num5; checked { this.short_0 = (short)(value.Count - 1); this.point3d_2 = new Point3d[(int)(this.short_0 + 1)]; this.entity_0 = new Entity[(int)(this.short_0 + 2 + 1)]; short num3 = 0; num4 = this.short_0; num5 = num3; } for (;;) { short num6 = num5; short num7 = num4; if (num6 > num7) { break; } Entity e = (Entity)transaction.GetObject(value[(int)num5].ObjectId, 0); Point3d entCenter = CAD.GetEntCenter(e); this.point3d_2[(int)num5] = entCenter; num5 += 1; } this.double_2 = this.point3d_2[0].Y; this.double_1 = this.point3d_2[0].Y; transaction.Commit(); PromptResult promptResult = editor.Drag(this); if (promptResult.Status == 5100) { short num8 = checked ((short)(this.entity_0.Length - 1)); if (num8 == 0) { CAD.AddEnt(this.entity_0[0]); } else { ObjectId[] array; short num10; short num11; checked { array = new ObjectId[(int)(num8 + 1)]; short num9 = 0; num10 = (short)(this.entity_0.Length - 1); num11 = num9; } for (;;) { short num12 = num11; short num7 = num10; if (num12 > num7) { break; } array[(int)num11] = CAD.AddEnt(this.entity_0[(int)num11]).ObjectId; num11 += 1; } if (flag) { Class36.smethod_55(array); } } } } } IL_238: goto IL_2B8; IL_23A: int num13 = num14 + 1; num14 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num13); IL_272: goto IL_2AD; IL_274: num14 = num2; if (num <= -2) { goto IL_23A; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_28A :; } catch when(endfilter(obj is Exception & num != 0 & num14 == 0)) { Exception ex = (Exception)obj2; goto IL_274; } IL_2AD: throw ProjectData.CreateProjectError(-2146828237); IL_2B8: if (num14 != 0) { ProjectData.ClearProjectError(); } }
public void TcYunXian() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; CAD.CreateLayer("注释", 1, "continuous", 30, false, false); IL_20: num2 = 3; double scale = CAD.GetScale(); IL_29: num2 = 4; bool flag; ObjectId[] array; short num5; short num6; checked { this.short_0 = (short)Math.Round(unchecked (50.0 * scale)); IL_43: num2 = 5; this.long_0 = (long)Math.Round(unchecked (500.0 * scale)); IL_5D: num2 = 6; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_6F: num2 = 7; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_84; } IL_7F: goto IL_233; IL_84: num2 = 10; flag = false; IL_8A: num2 = 11; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_93: num2 = 12; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_A7: num2 = 13; PromptResult promptResult = editor.Drag(this); IL_B4: num2 = 14; if (promptResult.Status != 5100) { goto IL_161; } IL_CA: num2 = 15; short num3 = (short)(this.entity_0.Length - 1); IL_DA: num2 = 16; if (num3 != 0) { goto IL_F7; } IL_E4: num2 = 17; CAD.AddEnt(this.entity_0[0]); goto IL_161; IL_F7: num2 = 19; IL_FA: num2 = 20; array = new ObjectId[(int)(num3 + 1)]; IL_108: num2 = 21; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_11C: num2 = 22; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_13E: num2 = 23; num6 += 1; } IL_14F: num2 = 24; if (!flag) { goto IL_161; } IL_156: num2 = 25; Class36.smethod_55(array); IL_161: goto IL_233; IL_166: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_1EA: goto IL_228; IL_1EC: num10 = num2; if (num <= -2) { goto IL_166; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_205 :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_1EC; } IL_228: throw ProjectData.CreateProjectError(-2146828237); IL_233: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public void SPlineToLine() { int num; int num4; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_16: num2 = 3; Database database = mdiActiveDocument.Database; IL_1F: num2 = 4; using (Transaction transaction = database.TransactionManager.StartTransaction()) { BlockTable blockTable = (BlockTable)transaction.GetObject(database.BlockTableId, 1); SymbolTableEnumerator enumerator = blockTable.GetEnumerator(); while (enumerator.MoveNext()) { ObjectId objectId = enumerator.Current; BlockTableRecord blockTableRecord = (BlockTableRecord)transaction.GetObject(objectId, 1); BlockTableRecordEnumerator enumerator2 = blockTableRecord.GetEnumerator(); while (enumerator2.MoveNext()) { ObjectId objectId2 = enumerator2.Current; Entity entity = (Entity)transaction.GetObject(objectId2, 1); if (entity is Spline) { Spline spline = (Spline)entity; Line e = new Line(spline.StartPoint, spline.EndPoint); CAD.AddEnt(e); spline.Erase(); } } if (enumerator2 != null) { enumerator2.Dispose(); } } if (enumerator != null) { enumerator.Dispose(); } transaction.Commit(); } IL_11B: goto IL_187; IL_11D: int num3 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3); IL_141: goto IL_17C; IL_143: num4 = num2; if (num <= -2) { goto IL_11D; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_159 :; } catch when(endfilter(obj is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj2; goto IL_143; } IL_17C: throw ProjectData.CreateProjectError(-2146828237); IL_187: if (num4 != 0) { ProjectData.ClearProjectError(); } }
public void 筋() { int num; int num4; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; Point3d point3d = CAD.GetPoint("选择插入点: "); IL_17: num2 = 3; Point3d point3d2; if (!(point3d == point3d2)) { goto IL_29; } IL_24: goto IL_311; IL_29: num2 = 6; double num3 = Class36.smethod_34(ref point3d); IL_34: num2 = 7; num3 = num3 * 180.0 / 3.1415926535897931; IL_4E: num2 = 8; Polyline polyline = new Polyline(); IL_56: num2 = 9; Point3d pointAngle = CAD.GetPointAngle(point3d, 75.0, num3 + 90.0); IL_76: num2 = 10; point3d = CAD.GetPointAngle(point3d, 75.0, num3 - 90.0); IL_97: num2 = 11; polyline.AddVertexAt(0, Class36.smethod_38(CAD.GetPointAngle(pointAngle, 350.0, num3)), 0.0, 45.0, 45.0); IL_D2: num2 = 12; polyline.AddVertexAt(1, Class36.smethod_38(CAD.GetPointAngle(pointAngle, 150.0, num3)), 0.0, 45.0, 45.0); IL_10D: num2 = 13; polyline.AddVertexAt(2, Class36.smethod_38(CAD.GetPointAngle(point3d, 100.0, num3)), 0.0, 45.0, 45.0); IL_149: num2 = 14; polyline.AddVertexAt(3, Class36.smethod_38(CAD.GetPointAngle(point3d, 100.0, num3 + 180.0)), 0.0, 45.0, 45.0); IL_18F: num2 = 15; polyline.AddVertexAt(4, Class36.smethod_38(CAD.GetPointAngle(pointAngle, 150.0, num3 + 180.0)), 0.0, 45.0, 45.0); IL_1D4: num2 = 16; polyline.AddVertexAt(5, Class36.smethod_38(CAD.GetPointAngle(pointAngle, 350.0, num3 + 180.0)), 0.0, 45.0, 45.0); IL_219: num2 = 17; polyline.ColorIndex = 10; IL_224: num2 = 18; CAD.AddEnt(polyline); IL_22E: num2 = 19; if (Information.Err().Number <= 0) { goto IL_255; } IL_240: num2 = 20; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_255: goto IL_311; IL_25A: goto IL_306; IL_25F: num4 = num2; if (num <= -2) { goto IL_277; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_2E0; IL_277: int num5 = num4 + 1; num4 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num5); IL_2E0 :; } catch when(endfilter(obj is Exception & num != 0 & num4 == 0)) { Exception ex = (Exception)obj2; goto IL_25F; } IL_306: throw ProjectData.CreateProjectError(-2146828237); IL_311: if (num4 != 0) { ProjectData.ClearProjectError(); } }
public void TcGJHJ_PM1() { int num; int num9; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; bool flag; ObjectId[] array; short num5; short num6; checked { this.long_0 = (long)Math.Round(Conversion.Val(Interaction.InputBox(" 输入钢筋桁架的宽度:", Class33.Class31_0.Info.ProductName, "100", -1, -1))); IL_3C: num2 = 3; if (this.long_0 != 0L) { goto IL_56; } IL_51: goto IL_265; IL_56: num2 = 6; this.double_0 = CAD.GetScale(); IL_63: num2 = 7; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_75: num2 = 8; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_8B; } IL_86: goto IL_265; IL_8B: num2 = 11; CAD.CreateLayer("钢筋桁架_PM", 14, "continuous", -1, false, true); IL_A3: num2 = 12; flag = false; IL_A9: num2 = 13; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_B2: num2 = 14; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_C6: num2 = 15; PromptResult promptResult = editor.Drag(this); IL_D2: num2 = 16; if (promptResult.Status != 5100) { goto IL_17E; } IL_E7: num2 = 17; short num3 = (short)(this.entity_0.Length - 1); IL_F7: num2 = 18; if (num3 != 0) { goto IL_114; } IL_101: num2 = 19; CAD.AddEnt(this.entity_0[0]); goto IL_17E; IL_114: num2 = 21; IL_117: num2 = 22; array = new ObjectId[(int)(num3 + 1)]; IL_125: num2 = 23; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_139: num2 = 24; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_15B: num2 = 25; num6 += 1; } IL_16C: num2 = 26; if (!flag) { goto IL_17E; } IL_173: num2 = 27; Class36.smethod_55(array); IL_17E: goto IL_265; IL_183: goto IL_25A; IL_188: num9 = num2; if (num <= -2) { goto IL_1A3; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_234; IL_1A3: int num10 = num9 + 1; num9 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num10); IL_234 :; } catch when(endfilter(obj is Exception & num != 0 & num9 == 0)) { Exception ex = (Exception)obj2; goto IL_188; } IL_25A: throw ProjectData.CreateProjectError(-2146828237); IL_265: if (num9 != 0) { ProjectData.ClearProjectError(); } }
private void method_0(ObjectIdCollection objectIdCollection_0) { Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; Polyline polyline = new Polyline(); bool flag = true; string layer = ""; Database workingDatabase = HostApplicationServices.WorkingDatabase; using (Transaction transaction = workingDatabase.TransactionManager.StartTransaction()) { Entity entity = (Entity)transaction.GetObject(objectIdCollection_0[0], 0); layer = entity.Layer; goto IL_4BB; } IL_6A: checked { try { foreach (object obj in objectIdCollection_0) { ObjectId objectId2; ObjectId objectId = (obj != null) ? ((ObjectId)obj) : objectId2; using (Transaction transaction2 = workingDatabase.TransactionManager.StartTransaction()) { Curve curve = (Curve)transaction2.GetObject(objectId, 1, false); string name = curve.GetType().Name; if (polyline.NumberOfVertices == 0) { if (Operators.CompareString(name, "Arc", false) == 0) { polyline.AddVertexAt(0, curve.StartPoint.Convert2d(new Plane()), this.method_1((Arc)curve, true), 0.0, 0.0); } else { polyline.AddVertexAt(0, curve.StartPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); } polyline.AddVertexAt(1, curve.EndPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); objectIdCollection_0.Remove(objectId); flag = true; break; } if (curve.StartPoint.DistanceTo(polyline.GetPoint3dAt(0)) <= 1.0) { if (Operators.CompareString(name, "Arc", false) == 0) { polyline.AddVertexAt(0, curve.EndPoint.Convert2d(new Plane()), this.method_1((Arc)curve, false), 0.0, 0.0); } else { polyline.AddVertexAt(0, curve.EndPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); } objectIdCollection_0.Remove(objectId); flag = true; break; } if (curve.EndPoint.DistanceTo(polyline.GetPoint3dAt(0)) <= 1.0) { if (Operators.CompareString(name, "Arc", false) == 0) { polyline.AddVertexAt(0, curve.StartPoint.Convert2d(new Plane()), this.method_1((Arc)curve, true), 0.0, 0.0); } else { polyline.AddVertexAt(0, curve.StartPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); } objectIdCollection_0.Remove(objectId); flag = true; break; } if (curve.StartPoint.DistanceTo(polyline.GetPoint3dAt(polyline.NumberOfVertices - 1)) <= 1.0) { if (Operators.CompareString(name, "Arc", false) == 0) { polyline.SetBulgeAt(polyline.NumberOfVertices - 1, this.method_1((Arc)curve, true)); } polyline.AddVertexAt(polyline.NumberOfVertices, curve.EndPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); objectIdCollection_0.Remove(objectId); flag = true; break; } if (curve.EndPoint.DistanceTo(polyline.GetPoint3dAt(polyline.NumberOfVertices - 1)) <= 1.0) { if (Operators.CompareString(name, "Arc", false) == 0) { polyline.SetBulgeAt(polyline.NumberOfVertices - 1, this.method_1((Arc)curve, false)); } polyline.AddVertexAt(polyline.NumberOfVertices, curve.StartPoint.Convert2d(new Plane()), 0.0, 0.0, 0.0); objectIdCollection_0.Remove(objectId); flag = true; break; } flag = false; transaction2.Commit(); } } } finally { IEnumerator enumerator; if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } if (objectIdCollection_0.Count < 1) { flag = false; } IL_4BB: if (!flag) { polyline.Layer = layer; CAD.AddEnt(polyline); if (objectIdCollection_0.Count > 0) { this.method_0(objectIdCollection_0); } return; } goto IL_6A; } }
public void TcZJM() { TcZJM_Frm tcZJM_Frm = new TcZJM_Frm(); tcZJM_Frm.ShowDialog(); checked { if (tcZJM_Frm.DialogResult == DialogResult.OK) { CAD.CreateLayer("柱截面", 2, "continuous", -1, false, true); CAD.CreateLayer("柱截面文字", 4, "continuous", -1, false, true); string text = tcZJM_Frm.ComboBox1.Text; double num; if (Operators.CompareString(text, "1:20", false) == 0) { num = 5.0; } else if (Operators.CompareString(text, "1:25", false) == 0) { num = 4.0; } else if (Operators.CompareString(text, "1:30", false) == 0) { num = 3.3333333333333335; } else if (Operators.CompareString(text, "1:40", false) == 0) { num = 2.5; } else if (Operators.CompareString(text, "1:50", false) == 0) { num = 2.0; } if (tcZJM_Frm.RadioButton1.Checked) { string text2 = tcZJM_Frm.TextBox1.Text; string text3 = tcZJM_Frm.TextBox2.Text.ToUpper(); string text4 = tcZJM_Frm.TextBox3.Text; string text5 = tcZJM_Frm.TextBox4.Text; string text6 = tcZJM_Frm.TextBox5.Text; string text7 = tcZJM_Frm.TextBox6.Text; object instance = text3.Split(new char[] { 'X' }); long num2 = Conversions.ToLong(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null)); long num3 = Conversions.ToLong(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null)); long num4 = (long)Math.Round(unchecked ((double)num2 * num)); long num5 = (long)Math.Round(unchecked ((double)num3 * num)); Point3d point = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(point == point3d)) { Point3d pointXY = CAD.GetPointXY(point, (double)num4 / 2.0, (double)num5 / 2.0); Point3d pointXY2 = CAD.GetPointXY(point, (double)(0L - num4) / 2.0, (double)num5 / 2.0); Point3d pointXY3 = CAD.GetPointXY(point, (double)(0L - num4) / 2.0, (double)(0L - num5) / 2.0); Point3d pointXY4 = CAD.GetPointXY(point, (double)num4 / 2.0, (double)(0L - num5) / 2.0); ObjectId id = CAD.AddPlinePxy(pointXY3, (double)num4, (double)num5, 0.0, "").ObjectId; CAD.ChangeLayer(id, "柱截面"); double num6 = 185.0; Point3d pointXY5 = CAD.GetPointXY(pointXY, (double)-185f, (double)-185f); Point3d pointXY6 = CAD.GetPointXY(pointXY2, num6, (double)-185f); Point3d pointXY7 = CAD.GetPointXY(pointXY3, num6, num6); Point3d pointXY8 = CAD.GetPointXY(pointXY4, (double)-185f, num6); num6 = 50.0; Class36.smethod_16(pointXY5, num6, "墙柱纵筋"); Class36.smethod_16(pointXY6, num6, "墙柱纵筋"); Class36.smethod_16(pointXY7, num6, "墙柱纵筋"); Class36.smethod_16(pointXY8, num6, "墙柱纵筋"); Class36.smethod_10(pointXY7, pointXY5, 5.0); Point3d[] array = null; Point3d[] array2 = null; short num8; if (Operators.CompareString(text6, "", false) != 0 & Operators.CompareString(text6, "0", false) != 0) { short num7 = (short)Strings.InStr(text6, "+", CompareMethod.Binary); if (num7 > 0) { num8 = (short)Math.Round(unchecked (Conversion.Val(text6.Substring(0, 1)) + Conversion.Val(text6.Substring((int)num7, 1)))); } else { num8 = (short)Math.Round(Conversion.Val(text6.Substring(0, 1))); } array = new Point3d[(int)(num8 - 1 + 1)]; array2 = new Point3d[(int)(num8 - 1 + 1)]; long num9 = (long)Math.Round((double)(num4 - 370L) / (double)(num8 + 1)); int num10 = 0; int num11 = (int)(num8 - 1); int num12 = num10; for (;;) { int num13 = num12; int num14 = num11; if (num13 > num14) { break; } array[num12] = CAD.GetPointXY(pointXY6, (double)(num9 *unchecked ((long)(checked (num12 + 1)))), 0.0); Class36.smethod_16(array[num12], 50.0, "墙柱纵筋"); array2[num12] = CAD.GetPointXY(pointXY7, (double)(num9 *unchecked ((long)(checked (num12 + 1)))), 0.0); Class36.smethod_16(array2[num12], 50.0, "墙柱纵筋"); num12++; } } Point3d[] array3 = null; Point3d[] array4 = null; int num16; if (Operators.CompareString(text7, "", false) != 0 & Operators.CompareString(text7, "0", false) != 0) { short num15 = (short)Strings.InStr(text7, "+", CompareMethod.Binary); if (num15 > 0) { num16 = (int)Math.Round(unchecked (Conversion.Val(text7.Substring(0, 1)) + Conversion.Val(text7.Substring((int)num15, 1)))); } else { num16 = (int)Math.Round(Conversion.Val(text7.Substring(0, 1))); } array3 = new Point3d[num16 - 1 + 1]; array4 = new Point3d[num16 - 1 + 1]; long num17 = (long)Math.Round((double)(num5 - 370L) / (double)(num16 + 1)); int num18 = 0; int num19 = num16 - 1; int num20 = num18; for (;;) { int num21 = num20; int num14 = num19; if (num21 > num14) { break; } array3[num20] = CAD.GetPointXY(pointXY6, 0.0, (double)((0L - num17) *unchecked ((long)(checked (num20 + 1))))); Class36.smethod_16(array3[num20], 50.0, "墙柱纵筋"); array4[num20] = CAD.GetPointXY(pointXY5, 0.0, (double)((0L - num17) *unchecked ((long)(checked (num20 + 1))))); Class36.smethod_16(array4[num20], 50.0, "墙柱纵筋"); num20++; } } string[] array_ = new string[] { text2, text3, text4.Replace("D", "%%132"), text5.Replace("D", "%%132") }; Point3d pointXY9 = CAD.GetPointXY(pointXY, -100.0, 2000.0); ObjectId[] array5 = Class36.smethod_20(pointXY9, array_, 300.0, 1.4, ""); foreach (ObjectId id in array5) { CAD.ChangeLayer(id, "柱截面文字"); } id = CAD.AddLine(CAD.GetPointXY(pointXY, -200.0, 0.0), CAD.GetPointXY(pointXY, -200.0, 1900.0), "0").ObjectId; CAD.ChangeLayer(id, "柱截面文字"); unchecked { if (Operators.CompareString(text6, "", false) != 0 & Operators.CompareString(text6, "0", false) != 0) { pointXY9..ctor((pointXY.X + pointXY2.X) / 2.0, pointXY.Y + 150.0, 0.0); id = Class36.smethod_57(text6.Replace("D", "%%132"), pointXY9, 300.0, 1, 0, "STANDARD", 0.0); CAD.ChangeLayer(id, "柱截面文字"); } if (Operators.CompareString(text7, "", false) != 0 & Operators.CompareString(text7, "0", false) != 0) { pointXY9..ctor(pointXY2.X - 150.0, (pointXY2.Y + pointXY3.Y) / 2.0, 0.0); id = Class36.smethod_57(text7.Replace("D", "%%132"), pointXY9, 300.0, 1, 0, "STANDARD", 1.5707963267948966); CAD.ChangeLayer(id, "柱截面文字"); } object obj = CAD.CreateTextStyle("Tc_尺寸标注", "txt.shx", "hztxt.Shx", 0.7); string dimStyleName = "Tc_Dim100"; object obj2 = obj; ObjectId objectId; ObjectId dimID = CAD.CreateDimStyle(dimStyleName, (obj2 != null) ? ((ObjectId)obj2) : objectId, 100, 1.0, false, -1.0); pointXY9 = CAD.GetPointXY(pointXY, 600.0, 0.0); CAD.AddLineDim(pointXY, pointXY4, pointXY9, 1.0 / num, dimID, -1.0); pointXY9 = CAD.GetPointXY(pointXY3, 0.0, -600.0); CAD.AddLineDim(pointXY3, pointXY4, pointXY9, 1.0 / num, dimID, -1.0); if (num2 > 300L) { if (num8 == 1) { Class36.smethod_8(array[0], array2[0], 5.0); } else if (num8 == 2) { Class36.smethod_10(array[0], array2[1], 5.0); } else if (num8 == 3) { Class36.smethod_10(array[0], array2[2], 5.0); Class36.smethod_8(array[1], array2[1], 5.0); } else if (num8 == 4) { Class36.smethod_10(array[0], array2[1], 5.0); Class36.smethod_10(array[2], array2[3], 5.0); } else if (num8 == 5) { Class36.smethod_10(array[1], array2[3], 5.0); Class36.smethod_8(array[2], array2[2], 5.0); } else if (num8 == 6) { Class36.smethod_10(array[1], array2[2], 5.0); Class36.smethod_10(array[3], array2[4], 5.0); } else if (num8 >= 7) { Class36.smethod_10(array[1], array2[2], 5.0); Class36.smethod_10(array[4], array2[5], 5.0); } } if (num3 > 300L) { if (num16 == 1) { Class36.smethod_8(array3[0], array4[0], 5.0); } else if (num16 == 2) { Class36.smethod_10(array3[0], array4[1], 5.0); } else if (num16 == 3) { Class36.smethod_10(array3[0], array4[2], 5.0); Class36.smethod_8(array3[1], array4[1], 5.0); } else if (num16 == 4) { Class36.smethod_10(array3[0], array4[1], 5.0); Class36.smethod_10(array3[2], array4[3], 5.0); } else if (num16 == 5) { Class36.smethod_10(array3[1], array4[3], 5.0); Class36.smethod_8(array3[2], array4[2], 5.0); } else if (num16 == 6) { Class36.smethod_10(array3[1], array4[2], 5.0); Class36.smethod_10(array3[3], array4[4], 5.0); } else if (num16 >= 7) { Class36.smethod_10(array3[1], array4[2], 5.0); Class36.smethod_10(array3[4], array4[5], 5.0); } } pointXY9 = CAD.GetPointXY(point, -400.0, (double)(checked (0L - num5)) / 2.0 - 2500.0); Class36.smethod_6(pointXY9, text2, 100.0, tcZJM_Frm.ComboBox1.Text); } } } else { string text8 = tcZJM_Frm.TextBox1.Text; string text9 = tcZJM_Frm.TextBox2.Text.ToUpper(); string text10 = tcZJM_Frm.TextBox3.Text; string text11 = tcZJM_Frm.TextBox4.Text; long num22 = (long)Math.Round(Conversion.Val(text9)); long num23 = (long)Math.Round((double)num22 / 2.0); object obj3 = Strings.InStr(text10, "D", CompareMethod.Binary); int num24 = (int)Math.Round(Conversion.Val(text10.Substring(0, Conversions.ToInteger(Operators.SubtractObject(obj3, 1))))); Point3d point2 = CAD.GetPoint("选择插入点: "); Point3d point3d; if (!(point2 == point3d)) { ObjectId id2 = CAD.AddCircle(point2, unchecked ((double)num23 * num), "").ObjectId; CAD.ChangeLayer(id2, "柱截面"); CAD.CreateLayer("箍筋", 1, "continuous", -1, false, true); CAD.CreateLayer("柱截面文字", 4, "continuous", -1, false, true); long num25 = (long)Math.Round(unchecked ((double)num23 * num - 85.0)); Point3d point3d2 = CAD.GetPointXY(point2, 0.0, (double)num25); Polyline polyline = new Polyline(); obj3 = Math.Tan(0.78539816339744828); polyline.AddVertexAt(0, Class36.smethod_38(point3d2), Conversions.ToDouble(obj3), (double)45f, (double)45f); point3d2 = CAD.GetPointXY(point3d2, 0.0, (double)(-2L * num25)); polyline.AddVertexAt(1, Class36.smethod_38(point3d2), Conversions.ToDouble(obj3), (double)45f, (double)45f); point3d2 = CAD.GetPointXY(point3d2, 0.0, (double)(2L * num25)); obj3 = Math.Tan(0.52359877559829882); polyline.AddVertexAt(2, Class36.smethod_38(point3d2), Conversions.ToDouble(obj3), (double)45f, (double)45f); point3d2 = CAD.GetPointAngle(point3d2, 185.0, 247.5); polyline.AddVertexAt(3, Class36.smethod_38(point3d2), 0.0, (double)45f, (double)45f); point3d2 = CAD.GetPointAngle(point3d2, 100.0, -45.0); polyline.AddVertexAt(4, Class36.smethod_38(point3d2), 0.0, (double)45f, (double)45f); id2 = CAD.AddEnt(polyline).ObjectId; CAD.ChangeLayer(id2, "箍筋"); int num26 = 0; int num27 = num24 - 1; int num28 = num26; for (;;) { int num29 = num28; int num14 = num27; if (num29 > num14) { break; } point3d2 = unchecked (CAD.GetPointAngle(point2, (double)num23 * num - 185.0, 360.0 / (double)num24 * (double)num28 + 90.0)); Class36.smethod_16(point3d2, 50.0, "墙柱纵筋"); num28++; } ObjectId style = Class36.smethod_78("Dim100", 100, 1.0, false); unchecked { Point3d pointXY10 = CAD.GetPointXY(point2, (double)(checked (0L - num23)) * num, (double)(checked (0L - num23)) * num); Point3d pointXY11 = CAD.GetPointXY(point2, (double)num23 * num, (double)(checked (0L - num23)) * num); point3d2 = CAD.GetPointXY(point2, 0.0, (double)(checked (0L - num23 - 200L)) * num); id2 = ModelSpace.AddDimAligned1(pointXY10, pointXY11, point3d2, Conversions.ToString(num22), style); pointXY10 = CAD.GetPointXY(point2, (double)(checked (0L - num23)) * num, (double)num23 * num); pointXY11 = CAD.GetPointXY(point2, (double)(checked (0L - num23)) * num, (double)(checked (0L - num23)) * num); point3d2 = CAD.GetPointXY(point2, (double)(checked (0L - num23 - 200L)) * num, 0.0); id2 = ModelSpace.AddDimAligned1(pointXY10, pointXY11, point3d2, Conversions.ToString(num22), style); string[] array_2 = new string[] { text8, text9, text10.Replace("D", "%%132"), text11.Replace("D", "%%132") }; point3d2 = CAD.GetPointXY(point2, (double)num23 * num + 100.0, 1800.0 + (double)num23 * num); ObjectId[] array7 = Class36.smethod_20(point3d2, array_2, 300.0, 1.4, ""); foreach (ObjectId id2 in array7) { CAD.ChangeLayer(id2, "柱截面文字"); } id2 = CAD.AddLine(CAD.GetPointXY(point2, (double)num23 * num * 0.714, (double)num23 * num * 0.714), CAD.GetPointXY(point2, ((double)num23 * num + 500.0) * 0.714, ((double)num23 * num + 500.0) * 0.714), "0").ObjectId; CAD.ChangeLayer(id2, "柱截面文字"); point3d2 = CAD.GetPointXY(point2, -80.0 * num, (double)(checked (0L - num23 - 500L)) * num); Class36.smethod_6(point3d2, text8, 100.0, "1:20"); } } } } } }
public void TcDDYZ1() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; CAD.CreateLayer("Y_引注", 4, "continuous", -3, false, true); IL_20: num2 = 3; CAD.CreateLayer("Y_引线", 5, "continuous", 13, false, true); IL_37: num2 = 4; this.double_0 = CAD.GetScale(); IL_44: num2 = 5; DBText dbtext = new DBText(); IL_4D: num2 = 6; dbtext.Height = 300.0 * this.double_0; IL_66: num2 = 7; dbtext.WidthFactor = 0.7; IL_78: num2 = 8; this.string_0 = Clipboard.GetText(); IL_85: num2 = 9; if (Operators.CompareString(this.string_0, "", false) != 0) { goto IL_AC; } IL_9E: num2 = 10; this.string_0 = "%%1328@200"; IL_AC: num2 = 12; if (this.string_0.Length <= 50) { goto IL_E1; } IL_C0: num2 = 13; this.string_0 = this.string_0.Substring(0, 40) + "……"; IL_E1: num2 = 15; dbtext.TextString = this.string_0; IL_F1: num2 = 16; this.double_1 = dbtext.GeometricExtents.MaxPoint.X - dbtext.GeometricExtents.MinPoint.X; IL_12D: num2 = 17; bool flag = false; IL_133: num2 = 18; this.entity_0 = new Entity[3]; IL_142: num2 = 21; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_151: num2 = 22; PromptPointOptions promptPointOptions = new PromptPointOptions("插入点:"); IL_160: num2 = 23; PromptPointResult point = mdiActiveDocument.Editor.GetPoint(promptPointOptions); IL_173: num2 = 24; if (point.Status != 5100) { goto IL_255; } IL_189: num2 = 25; this.point3d_2 = point.Value; IL_199: num2 = 26; PromptResult promptResult = mdiActiveDocument.Editor.Drag(this); IL_1AB: num2 = 27; if (promptResult.Status != 5100) { goto IL_255; } IL_1C1: num2 = 28; ObjectId[] array; short num5; short num6; checked { short num3 = (short)(this.entity_0.Length - 1); IL_1D1: num2 = 29; if (num3 != 0) { goto IL_1EE; } IL_1DB: num2 = 30; CAD.AddEnt(this.entity_0[0]); goto IL_255; IL_1EE: num2 = 32; IL_1F1: num2 = 33; array = new ObjectId[(int)(num3 + 1)]; IL_1FE: num2 = 34; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_212: num2 = 35; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_233: num2 = 36; num6 += 1; } IL_244: num2 = 37; if (!flag) { goto IL_255; } IL_24B: num2 = 38; Class36.smethod_55(array); IL_255: goto IL_35F; IL_25A: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_316: goto IL_354; IL_318: num10 = num2; if (num <= -2) { goto IL_25A; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_331 :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_318; } IL_354: throw ProjectData.CreateProjectError(-2146828237); IL_35F: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public void TcDDYZ6() { int num; int num9; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; CAD.CreateLayer("Y_引注", 4, "continuous", -3, false, true); IL_20: num2 = 3; CAD.CreateLayer("Y_引线", 5, "continuous", 13, false, true); IL_37: num2 = 4; this.double_0 = CAD.GetScale(); IL_44: num2 = 5; DBText dbtext = new DBText(); IL_4D: num2 = 6; dbtext.Height = 300.0; IL_5F: num2 = 7; dbtext.WidthFactor = 0.7; IL_71: num2 = 8; this.string_0 = Clipboard.GetText(); IL_7E: num2 = 9; if (Operators.CompareString(this.string_0, "", false) != 0) { goto IL_C4; } IL_97: num2 = 10; this.entity_0 = new Entity[3]; IL_A6: num2 = 13; this.double_1 = 300.0 * this.double_0; goto IL_15E; IL_C4: num2 = 15; IL_C7: num2 = 16; this.entity_0 = new Entity[4]; IL_D6: num2 = 19; if (this.string_0.Length <= 50) { goto IL_10B; } IL_EA: num2 = 20; this.string_0 = this.string_0.Substring(0, 40) + "……"; IL_10B: num2 = 22; dbtext.TextString = this.string_0; IL_11B: num2 = 23; this.double_1 = (dbtext.GeometricExtents.MaxPoint.X - dbtext.GeometricExtents.MinPoint.X) * this.double_0; IL_15E: num2 = 25; bool flag = false; IL_164: num2 = 26; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_172: num2 = 27; PromptPointOptions promptPointOptions = new PromptPointOptions("插入点:"); IL_180: num2 = 28; PromptPointResult point = mdiActiveDocument.Editor.GetPoint(promptPointOptions); IL_191: num2 = 29; if (point.Status != 5100) { goto IL_27B; } IL_1A7: num2 = 30; this.point3d_2 = point.Value; IL_1B7: num2 = 31; PromptResult promptResult = mdiActiveDocument.Editor.Drag(this); IL_1C8: num2 = 32; if (promptResult.Status != 5100) { goto IL_27B; } IL_1DE: num2 = 33; ObjectId[] array; short num5; short num6; checked { short num3 = (short)(this.entity_0.Length - 1); IL_1EE: num2 = 34; if (num3 != 0) { goto IL_20B; } IL_1F8: num2 = 35; CAD.AddEnt(this.entity_0[0]); goto IL_27B; IL_20B: num2 = 37; IL_20E: num2 = 38; array = new ObjectId[(int)(num3 + 1)]; IL_21C: num2 = 39; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_231: num2 = 40; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_255: num2 = 41; num6 += 1; } IL_269: num2 = 42; if (!flag) { goto IL_27B; } IL_270: num2 = 43; Class36.smethod_55(array); IL_27B: goto IL_39B; IL_280: goto IL_3A6; IL_285: num9 = num2; if (num <= -2) { goto IL_2A0; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_375; IL_2A0: int num10 = num9 + 1; num9 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num10); IL_375: goto IL_3A6; } catch when(endfilter(obj is Exception & num != 0 & num9 == 0)) { Exception ex = (Exception)obj2; goto IL_285; } IL_39B: if (num9 != 0) { ProjectData.ClearProjectError(); } return; IL_3A6: throw ProjectData.CreateProjectError(-2146828237); }
public void TcDDYZ4() { int num; int num9; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; CAD.CreateLayer("Y_引注", 4, "continuous", -3, false, true); IL_21: num2 = 3; CAD.CreateLayer("Y_引线", 5, "continuous", 13, false, true); IL_39: num2 = 4; this.double_0 = CAD.GetScale(); IL_47: num2 = 5; DBText dbtext = new DBText(); IL_51: num2 = 6; dbtext.Height = 300.0 * this.double_0; IL_6B: num2 = 7; dbtext.Rotation = 1.5707963267948966; IL_7E: num2 = 8; dbtext.WidthFactor = 0.7; IL_91: num2 = 9; this.string_0 = Clipboard.GetText(); IL_A0: num2 = 10; if (Operators.CompareString(this.string_0, "", false) != 0) { goto IL_C9; } IL_BA: num2 = 11; this.string_0 = "%%1328@200"; IL_C9: num2 = 13; if (this.string_0.Length <= 50) { goto IL_100; } IL_DE: num2 = 14; this.string_0 = this.string_0.Substring(0, 40) + "……"; IL_100: num2 = 16; dbtext.TextString = this.string_0; IL_111: num2 = 17; this.double_1 = dbtext.GeometricExtents.MaxPoint.Y - dbtext.GeometricExtents.MinPoint.Y; IL_14E: num2 = 18; bool flag = false; IL_155: num2 = 19; this.entity_0 = new Entity[2]; IL_165: num2 = 22; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_175: num2 = 23; PromptPointOptions promptPointOptions = new PromptPointOptions("插入点:"); IL_185: num2 = 24; PromptPointResult point = mdiActiveDocument.Editor.GetPoint(promptPointOptions); IL_199: num2 = 25; if (point.Status != 5100) { goto IL_288; } IL_1B0: num2 = 26; this.point3d_2 = point.Value; IL_1C1: num2 = 27; PromptResult promptResult = mdiActiveDocument.Editor.Drag(this); IL_1D4: num2 = 28; if (promptResult.Status != 5100) { goto IL_288; } IL_1EB: num2 = 29; ObjectId[] array; short num5; short num6; checked { short num3 = (short)(this.entity_0.Length - 1); IL_1FC: num2 = 30; if (num3 != 0) { goto IL_21B; } IL_207: num2 = 31; CAD.AddEnt(this.entity_0[0]); goto IL_288; IL_21B: num2 = 33; IL_21F: num2 = 34; array = new ObjectId[(int)(num3 + 1)]; IL_22E: num2 = 35; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_242: num2 = 36; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_265: num2 = 37; num6 += 1; } IL_274: num2 = 38; if (!flag) { goto IL_288; } IL_27C: num2 = 39; Class36.smethod_55(array); IL_288: goto IL_399; IL_28D: goto IL_3A4; IL_292: num9 = num2; if (num <= -2) { goto IL_2AE; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_373; IL_2AE: int num10 = num9 + 1; num9 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num10); IL_373: goto IL_3A4; } catch when(endfilter(obj is Exception & num != 0 & num9 == 0)) { Exception ex = (Exception)obj2; goto IL_292; } IL_399: if (num9 != 0) { ProjectData.ClearProjectError(); } return; IL_3A4: throw ProjectData.CreateProjectError(-2146828237); }
public void method_0() { Point3d first = this.object_0[0]; (from Point3d point in this.object_0 orderby Class37.smethod_0(first, point) select point).ToArray <Point3d>(); Class38 @class = new Class38(this.object_0); @class.method_0(); Point3dCollection point3dCollection_ = @class.point3dCollection_1; List <Line> list = new List <Line>(); list.Add(new Line(point3dCollection_[0], point3dCollection_[1])); int i = 0; checked { while (i < list.Count) { double num = -1.0; bool flag = false; int num2 = 0; int j = 0; while (j < this.object_0.Count) { if (Class37.smethod_1(this.object_0[j], list[i].StartPoint, list[i].EndPoint)) { double num3 = Class37.smethod_2(this.object_0[j], list[i].StartPoint, list[i].EndPoint); if (num3 > num) { num = num3; num2 = j; } flag = true; } Math.Max(Interlocked.Increment(ref j), j - 1); } if (flag) { Line line = new Line(); Line line2 = new Line(); line.StartPoint = list[i].StartPoint; line.EndPoint = this.object_0[num2]; bool flag2 = false; int k = 0; while (k < list.Count) { bool flag3 = (line.StartPoint == list[k].StartPoint && line.EndPoint == list[k].EndPoint) || (line.EndPoint == list[k].StartPoint && line.StartPoint == list[k].EndPoint); flag2 = (flag2 || flag3); Math.Max(Interlocked.Increment(ref k), k - 1); } if (!flag2) { list.Add(line); } line2.StartPoint = this.object_0[num2]; line2.EndPoint = list[i].EndPoint; k = 0; while (k < list.Count) { bool flag4 = (line2.StartPoint == list[k].StartPoint && line2.EndPoint == list[k].EndPoint) || (line2.EndPoint == list[k].StartPoint && line2.StartPoint == list[k].EndPoint); flag2 = (flag2 || flag4); Math.Max(Interlocked.Increment(ref k), k - 1); } if (!flag2) { list.Add(line2); } } Math.Max(Interlocked.Increment(ref i), i - 1); } try { foreach (Line e in list) { CAD.AddEnt(e); } } finally { List <Line> .Enumerator enumerator; ((IDisposable)enumerator).Dispose(); } } }
private void Button1_Click(object sender, EventArgs e) { int num; int num13; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; this.document_0.SendStringToExecute("\u0003\u0003", false, false, false); IL_1E: num2 = 3; if (Operators.CompareString(this.TextBox1.Text, "", false) != 0) { goto IL_4E; } IL_3B: num2 = 4; this.TextBox1.Focus(); IL_49: goto IL_6EB; IL_4E: num2 = 7; DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); IL_60: num2 = 8; long num3 = (long)this.int_0; string textString; long num7; Point3d maxPoint; Point3d minPoint; Polyline polyline; Polyline polyline2; int num8; checked { long num4 = this.long_0 - 1L; this.long_1 = num3; DBText dbtext; for (;;) { long num5 = this.long_1; long num6 = num4; if (num5 <= num6) { IL_90: num2 = 9; using (Transaction transaction = this.database_0.TransactionManager.StartTransaction()) { dbtext = (DBText)transaction.GetObject(this.selectionSet_0[(int)this.long_1].ObjectId, 1); textString = dbtext.TextString; goto IL_118; } IL_E8: num2 = 12; if (num7 <= 0L) { IL_FA: num2 = 44; this.long_1 += 1L; continue; } break; IL_118: num2 = 11; num7 = unchecked ((long)Strings.InStr(textString, this.TextBox1.Text, CompareMethod.Binary)); goto IL_E8; } goto IL_4F2; } IL_133: num2 = 13; maxPoint = dbtext.GeometricExtents.MaxPoint; IL_148: num2 = 14; minPoint = dbtext.GeometricExtents.MinPoint; IL_15D: num2 = 15; Class36.smethod_64(this.entity_0.ObjectId); IL_171: num2 = 16; polyline = new Polyline(); IL_17B: num2 = 17; polyline.SetDatabaseDefaults(); IL_185: num2 = 18; polyline2 = polyline; num8 = 0; } Point2d point2d; point2d..ctor(minPoint.X - 100.0, minPoint.Y - 100.0); polyline2.AddVertexAt(num8, point2d, 0.0, 20.0, 20.0); IL_1D6: num2 = 19; Polyline polyline3 = polyline; int num9 = 1; point2d..ctor(minPoint.X - 100.0, maxPoint.Y + 100.0); polyline3.AddVertexAt(num9, point2d, 0.0, 20.0, 20.0); IL_227: num2 = 20; Polyline polyline4 = polyline; int num10 = 2; point2d..ctor(maxPoint.X + 100.0, maxPoint.Y + 100.0); polyline4.AddVertexAt(num10, point2d, 0.0, 20.0, 20.0); IL_278: num2 = 21; Polyline polyline5 = polyline; int num11 = 3; point2d..ctor(maxPoint.X + 100.0, minPoint.Y - 100.0); polyline5.AddVertexAt(num11, point2d, 0.0, 20.0, 20.0); IL_2C9: num2 = 22; polyline.Closed = true; IL_2D4: num2 = 23; polyline.ColorIndex = 10; IL_2E0: num2 = 24; this.entity_0 = CAD.AddEnt(polyline); IL_2F0: num2 = 25; object systemVariable = Application.GetSystemVariable("TARGET"); Point3d point3d2; Point3d point3d = (systemVariable != null) ? ((Point3d)systemVariable) : point3d2; IL_311: num2 = 26; maxPoint..ctor(maxPoint.X - point3d.X, maxPoint.Y - point3d.Y, maxPoint.Z - point3d.Z); IL_348: num2 = 27; minPoint..ctor(minPoint.X - point3d.X, minPoint.Y - point3d.Y, minPoint.Z - point3d.Z); IL_37F: num2 = 28; long val; long val2; ViewTableRecord currentView; AbstractViewTableRecord abstractViewTableRecord; checked { val = (long)Math.Round(unchecked (maxPoint.get_Coordinate(1) - minPoint.get_Coordinate(1))); IL_39B: num2 = 29; val2 = (long)Math.Round(unchecked (maxPoint.get_Coordinate(0) - minPoint.get_Coordinate(0))); IL_3B7: num2 = 30; currentView = this.editor_0.GetCurrentView(); IL_3C7: num2 = 31; abstractViewTableRecord = currentView; } point2d..ctor((maxPoint.get_Coordinate(0) + minPoint.get_Coordinate(0)) / 2.0, (minPoint.get_Coordinate(1) + maxPoint.get_Coordinate(1)) / 2.0); abstractViewTableRecord.CenterPoint = point2d; IL_410: num2 = 32; object left = Math.Max(val2, val); IL_423: num2 = 33; currentView.Height = Conversions.ToDouble(Operators.MultiplyObject(left, 2)); IL_43F: num2 = 34; currentView.Width = Conversions.ToDouble(Operators.MultiplyObject(left, 2)); IL_45B: num2 = 35; this.editor_0.SetCurrentView(currentView); IL_46B: num2 = 36; Class36.smethod_60(Conversion.Str(num7)); IL_480: num2 = 37; this.TextBox3.Text = textString; IL_490: num2 = 38; checked { this.TextBox3.SelectionStart = (int)(num7 - 1L); IL_4AB: num2 = 39; this.TextBox3.SelectionLength = Strings.Len(this.TextBox1.Text); IL_4C9: num2 = 40; this.TextBox3.Focus(); IL_4D8: num2 = 41; this.int_0 = (int)(this.long_1 + 1L); IL_4F2: num2 = 45; if (!(this.long_0 == 0L | this.long_1 >= this.long_0 - 1L)) { goto IL_57D; } IL_524: num2 = 46; this.Button1.Enabled = false; IL_533: num2 = 47; this.TextBox3.Text = "查无内容。"; IL_546: num2 = 48; this.Button1.Enabled = false; IL_555: num2 = 49; this.Button2.Enabled = false; IL_564: num2 = 50; this.Button3.Enabled = false; IL_573: num2 = 51; this.int_0 = 0; IL_57D: num2 = 53; documentLock.Dispose(); IL_586: num2 = 54; if (Information.Err().Number <= 0) { goto IL_5AD; } IL_598: num2 = 55; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_5AD: goto IL_6EB; IL_5B2 :; } int num12 = num13 + 1; num13 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num12); IL_6A2: goto IL_6E0; IL_6A4: num13 = num2; if (num <= -2) { goto IL_5B2; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_6BD :; } catch when(endfilter(obj is Exception & num != 0 & num13 == 0)) { Exception ex = (Exception)obj2; goto IL_6A4; } IL_6E0: throw ProjectData.CreateProjectError(-2146828237); IL_6EB: if (num13 != 0) { ProjectData.ClearProjectError(); } }
public void TcYunXian1() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; double scale = CAD.GetScale(); IL_12: num2 = 3; bool flag; ObjectId[] array; short num5; short num6; checked { this.short_0 = (short)Math.Round(unchecked (50.0 * scale)); IL_2C: num2 = 4; this.long_0 = (long)Math.Round(unchecked (500.0 * scale)); IL_46: num2 = 5; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_58: num2 = 6; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_6E; } IL_69: goto IL_21A; IL_6E: num2 = 9; flag = false; IL_74: num2 = 10; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_7D: num2 = 11; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_90: num2 = 12; PromptResult promptResult = editor.Drag(this); IL_9C: num2 = 13; if (promptResult.Status != 5100) { goto IL_14C; } IL_B2: num2 = 14; short num3 = (short)(this.entity_0.Length - 1); IL_C2: num2 = 15; if (num3 != 0) { goto IL_DF; } IL_CC: num2 = 16; CAD.AddEnt(this.entity_0[0]); goto IL_14C; IL_DF: num2 = 18; IL_E2: num2 = 19; array = new ObjectId[(int)(num3 + 1)]; IL_EF: num2 = 20; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_104: num2 = 21; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_127: num2 = 22; num6 += 1; } IL_13B: num2 = 23; if (!flag) { goto IL_14C; } IL_142: num2 = 24; Class36.smethod_55(array); IL_14C: goto IL_21A; IL_151: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_1D1: goto IL_20F; IL_1D3: num10 = num2; if (num <= -2) { goto IL_151; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_1EC :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_1D3; } IL_20F: throw ProjectData.CreateProjectError(-2146828237); IL_21A: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public void YuanGou() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; this.double_0 = CAD.GetScale(); IL_17: num2 = 3; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_2A: num2 = 4; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_41; } IL_3C: goto IL_1FF; IL_41: num2 = 7; bool flag = false; IL_47: num2 = 8; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_50: num2 = 9; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_65: num2 = 10; Class36.smethod_60("按下shift建,可切换方向:"); IL_74: num2 = 11; PromptResult promptResult = editor.Drag(this); IL_82: num2 = 12; if (promptResult.Status != 5100) { goto IL_138; } IL_99: num2 = 13; ObjectId[] array; short num5; short num6; checked { short num3 = (short)(this.entity_0.Length - 1); IL_AA: num2 = 14; if (num3 != 0) { goto IL_C9; } IL_B5: num2 = 15; CAD.AddEnt(this.entity_0[0]); goto IL_138; IL_C9: num2 = 17; IL_CD: num2 = 18; array = new ObjectId[(int)(num3 + 1)]; IL_DC: num2 = 19; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_F0: num2 = 20; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_113: num2 = 21; num6 += 1; } IL_124: num2 = 22; if (!flag) { goto IL_138; } IL_12C: num2 = 23; Class36.smethod_55(array); IL_138: goto IL_1FF; IL_13D: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_1B7: goto IL_1F4; IL_1B9: num10 = num2; if (num <= -2) { goto IL_13D; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_1D2 :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_1B9; } IL_1F4: throw ProjectData.CreateProjectError(-2146828237); IL_1FF: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public void TcGJHJ_LM1() { int num; int num9; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; bool flag; ObjectId[] array; short num5; short num6; checked { this.long_0 = (long)Math.Round(Conversion.Val(Interaction.InputBox("输入钢筋桁架高度:", "田草CAD工具箱-绘制钢筋桁架", "100", -1, -1))); IL_32: num2 = 3; if (this.long_0 != 0L) { goto IL_4C; } IL_47: goto IL_24E; IL_4C: num2 = 6; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_5E: num2 = 7; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_74; } IL_6F: goto IL_24E; IL_74: num2 = 10; CAD.CreateLayer("钢筋桁架_LM", 14, "continuous", -1, false, true); IL_8C: num2 = 11; flag = false; IL_91: num2 = 12; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_9A: num2 = 13; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_AD: num2 = 14; PromptResult promptResult = editor.Drag(this); IL_B9: num2 = 15; if (promptResult.Status != 5100) { goto IL_16B; } IL_CF: num2 = 16; short num3 = (short)(this.entity_0.Length - 1); IL_DF: num2 = 17; if (num3 != 0) { goto IL_FC; } IL_E9: num2 = 18; CAD.AddEnt(this.entity_0[0]); goto IL_16B; IL_FC: num2 = 20; IL_FF: num2 = 21; array = new ObjectId[(int)(num3 + 1)]; IL_10D: num2 = 22; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_122: num2 = 23; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_146: num2 = 24; num6 += 1; } IL_15A: num2 = 25; if (!flag) { goto IL_16B; } IL_160: num2 = 26; Class36.smethod_55(array); IL_16B: goto IL_24E; IL_170: goto IL_243; IL_175: num9 = num2; if (num <= -2) { goto IL_190; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); goto IL_21D; IL_190: int num10 = num9 + 1; num9 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num10); IL_21D :; } catch when(endfilter(obj is Exception & num != 0 & num9 == 0)) { Exception ex = (Exception)obj2; goto IL_175; } IL_243: throw ProjectData.CreateProjectError(-2146828237); IL_24E: if (num9 != 0) { ProjectData.ClearProjectError(); } }
public void TcGuJin() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; this.double_0 = CAD.GetScale(); IL_16: num2 = 3; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_28: num2 = 4; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_3E; } IL_39: goto IL_1F8; IL_3E: num2 = 7; CAD.CreateLayer("钢筋", 10, "continuous", -1, false, true); IL_55: num2 = 8; bool flag = false; IL_5A: num2 = 9; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_63: num2 = 10; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_77: num2 = 11; PromptResult promptResult = editor.Drag(this); IL_84: num2 = 12; if (promptResult.Status != 5100) { goto IL_12E; } IL_9A: num2 = 13; ObjectId[] array; short num5; short num6; checked { short num3 = (short)(this.entity_0.Length - 1); IL_A9: num2 = 14; if (num3 != 0) { goto IL_C5; } IL_B2: num2 = 15; CAD.AddEnt(this.entity_0[0]); goto IL_12E; IL_C5: num2 = 17; IL_C8: num2 = 18; array = new ObjectId[(int)(num3 + 1)]; IL_D5: num2 = 19; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_E9: num2 = 20; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_10B: num2 = 21; num6 += 1; } IL_11C: num2 = 22; if (!flag) { goto IL_12E; } IL_123: num2 = 23; Class36.smethod_55(array); IL_12E: goto IL_1F8; IL_133: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_1AF: goto IL_1ED; IL_1B1: num10 = num2; if (num <= -2) { goto IL_133; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_1CA :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_1B1; } IL_1ED: throw ProjectData.CreateProjectError(-2146828237); IL_1F8: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public void TcGJHJ_LM() { int num; int num10; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; bool flag; ObjectId[] array; short num5; short num6; checked { this.long_0 = (long)Math.Round(Conversion.Val(Interaction.InputBox("输入钢筋桁架高度:", "田草CAD工具箱-绘制钢筋桁架", "100", -1, -1))); IL_32: num2 = 3; if (this.long_0 != 0L) { goto IL_4C; } IL_47: goto IL_253; IL_4C: num2 = 6; this.double_0 = CAD.GetScale(); IL_59: num2 = 7; this.point3d_0 = CAD.GetPoint("选择插入点: "); IL_6B: num2 = 8; Point3d point3d; if (!(this.point3d_0 == point3d)) { goto IL_80; } IL_7B: goto IL_253; IL_80: num2 = 11; CAD.CreateLayer("钢筋桁架", 14, "continuous", -1, false, true); IL_98: num2 = 12; flag = false; IL_9E: num2 = 13; Database workingDatabase = HostApplicationServices.WorkingDatabase; IL_A7: num2 = 14; Editor editor = Application.DocumentManager.MdiActiveDocument.Editor; IL_BA: num2 = 15; PromptResult promptResult = editor.Drag(this); IL_C6: num2 = 16; if (promptResult.Status != 5100) { goto IL_179; } IL_DC: num2 = 17; short num3 = (short)(this.entity_0.Length - 1); IL_EC: num2 = 18; if (num3 != 0) { goto IL_109; } IL_F6: num2 = 19; CAD.AddEnt(this.entity_0[0]); goto IL_179; IL_109: num2 = 21; IL_10C: num2 = 22; array = new ObjectId[(int)(num3 + 1)]; IL_11A: num2 = 23; short num4 = 0; num5 = (short)(this.entity_0.Length - 1); num6 = num4; } for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } IL_12F: num2 = 24; array[(int)num6] = CAD.AddEnt(this.entity_0[(int)num6]).ObjectId; IL_153: num2 = 25; num6 += 1; } IL_167: num2 = 26; if (!flag) { goto IL_179; } IL_16E: num2 = 27; Class36.smethod_55(array); IL_179: goto IL_253; IL_17E: int num9 = num10 + 1; num10 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num9); IL_20A: goto IL_248; IL_20C: num10 = num2; if (num <= -2) { goto IL_17E; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_225 :; } catch when(endfilter(obj is Exception & num != 0 & num10 == 0)) { Exception ex = (Exception)obj2; goto IL_20C; } IL_248: throw ProjectData.CreateProjectError(-2146828237); IL_253: if (num10 != 0) { ProjectData.ClearProjectError(); } }
public Entity GZG(double B, double H, double D, double T, double R) { Point3d point3d; point3d..ctor(0.0, 0.0, 0.0); double num = T - (B - D) / 4.0 / 6.0; double num2 = num / Math.Tan(1.5707963267948966 - (1.5707963267948966 + Math.Atan(0.16666666666666666)) / 2.0); double num3 = num2 * (1.0 - Math.Cos(Math.Atan(6.0))); double num4 = num2 * Math.Sin(Math.Atan(6.0)); double num5 = R / Math.Tan((1.5707963267948966 + Math.Atan(0.16666666666666666)) / 2.0); double[] array = new double[32]; array[0] = point3d.get_Coordinate(0); array[1] = point3d.get_Coordinate(1); array[2] = point3d.get_Coordinate(0) + B; array[3] = point3d.get_Coordinate(1); array[4] = point3d.get_Coordinate(0) + B - num3; array[5] = point3d.get_Coordinate(1) + num4; array[6] = array[4] - ((B - D) / 2.0 - num3 - num5 * Math.Cos(Math.Atan(0.16666666666666666))); array[7] = array[5] + ((B - D) / 2.0 - num3 - num5 * Math.Cos(Math.Atan(0.16666666666666666))) / 6.0; array[8] = array[6] - num5 * Math.Cos(Math.Atan(0.16666666666666666)); array[9] = array[7] + num5 * Math.Sin(Math.Atan(0.16666666666666666)) + num5; array[10] = array[8]; array[11] = array[9] + (H - (array[9] - array[1]) * 2.0); array[12] = array[6]; array[13] = array[11] + num5 + num5 * Math.Sin(Math.Atan(0.16666666666666666)); array[14] = point3d.get_Coordinate(0) + B - num3; array[15] = point3d.get_Coordinate(1) + H - num4; array[16] = point3d.get_Coordinate(0) + B; array[17] = point3d.get_Coordinate(1) + H; array[18] = point3d.get_Coordinate(0); array[19] = point3d.get_Coordinate(1) + H; array[20] = point3d.get_Coordinate(0) + num3; array[21] = point3d.get_Coordinate(1) + H - num4; array[22] = array[20] + (B - D) / 2.0 - num3 - num5 * Math.Cos(Math.Atan(0.16666666666666666)); array[23] = array[13]; array[24] = array[10] - D; array[25] = array[11]; array[26] = array[8] - D; array[27] = array[9]; array[28] = array[22]; array[29] = array[7]; array[30] = array[20]; array[31] = array[5]; Polyline polyline = new Polyline(); double num6 = Math.Tan((1.5707963267948966 - Math.Atan(0.16666666666666666)) / 4.0); Polyline polyline2 = polyline; int num7 = 0; Point2d point2d; point2d..ctor(array[0], array[1]); polyline2.AddVertexAt(num7, point2d, 0.0, 0.0, 0.0); Polyline polyline3 = polyline; int num8 = 1; point2d..ctor(array[2], array[3]); polyline3.AddVertexAt(num8, point2d, num6, 0.0, 0.0); Polyline polyline4 = polyline; int num9 = 2; point2d..ctor(array[4], array[5]); polyline4.AddVertexAt(num9, point2d, 0.0, 0.0, 0.0); Polyline polyline5 = polyline; int num10 = 3; point2d..ctor(array[6], array[7]); polyline5.AddVertexAt(num10, point2d, -num6, 0.0, 0.0); Polyline polyline6 = polyline; int num11 = 4; point2d..ctor(array[8], array[9]); polyline6.AddVertexAt(num11, point2d, 0.0, 0.0, 0.0); Polyline polyline7 = polyline; int num12 = 5; point2d..ctor(array[10], array[11]); polyline7.AddVertexAt(num12, point2d, -num6, 0.0, 0.0); Polyline polyline8 = polyline; int num13 = 6; point2d..ctor(array[12], array[13]); polyline8.AddVertexAt(num13, point2d, 0.0, 0.0, 0.0); Polyline polyline9 = polyline; int num14 = 7; point2d..ctor(array[14], array[15]); polyline9.AddVertexAt(num14, point2d, num6, 0.0, 0.0); Polyline polyline10 = polyline; int num15 = 8; point2d..ctor(array[16], array[17]); polyline10.AddVertexAt(num15, point2d, 0.0, 0.0, 0.0); Polyline polyline11 = polyline; int num16 = 9; point2d..ctor(array[18], array[19]); polyline11.AddVertexAt(num16, point2d, num6, 0.0, 0.0); Polyline polyline12 = polyline; int num17 = 10; point2d..ctor(array[20], array[21]); polyline12.AddVertexAt(num17, point2d, 0.0, 0.0, 0.0); Polyline polyline13 = polyline; int num18 = 11; point2d..ctor(array[22], array[23]); polyline13.AddVertexAt(num18, point2d, -num6, 0.0, 0.0); Polyline polyline14 = polyline; int num19 = 12; point2d..ctor(array[24], array[25]); polyline14.AddVertexAt(num19, point2d, 0.0, 0.0, 0.0); Polyline polyline15 = polyline; int num20 = 13; point2d..ctor(array[26], array[27]); polyline15.AddVertexAt(num20, point2d, -num6, 0.0, 0.0); Polyline polyline16 = polyline; int num21 = 14; point2d..ctor(array[28], array[29]); polyline16.AddVertexAt(num21, point2d, 0.0, 0.0, 0.0); Polyline polyline17 = polyline; int num22 = 15; point2d..ctor(array[30], array[31]); polyline17.AddVertexAt(num22, point2d, num6, 0.0, 0.0); polyline.Closed = true; CAD.AddEnt(polyline); return(polyline); }