public void TcDuanMianByLine() { Point3d p; Point3d p2; Class36.smethod_31(ref p, ref p2, "选择插入点:"); Line line = CAD.AddLine(p, p2, "0"); string text = Interaction.InputBox("直接距离" + Conversions.ToString(checked ((long)Math.Round(line.Length))) + ",请输入分布的钢筋根数", "", "2", -1, -1); if (Operators.CompareString(text, "", false) != 0) { double num = line.Length / (Conversions.ToDouble(text) + 1.0); double num2 = Class36.double_0 / 2.0; double num3 = num2; short num4; short num6; short num7; checked { if (num3 == 1.0) { num4 = (short)Math.Round(unchecked (35.0 * num2)); } else if (num3 == 1.25) { num4 = (short)Math.Round(unchecked (30.0 * num2)); } else if (num3 == 2.0) { num4 = (short)Math.Round(unchecked (25.0 * num2)); } else if (num3 == 2.5) { num4 = (short)Math.Round(unchecked (25.0 * num2)); } short num5 = 1; num6 = Conversions.ToShort(text); num7 = num5; } for (;;) { short num8 = num7; short num9 = num6; if (num8 > num9) { break; } Point3d pointAtDist = line.GetPointAtDist(num * (double)num7); Class36.smethod_16(pointAtDist, (double)num4, "墙柱纵筋"); num7 += 1; } Class36.smethod_64(line.ObjectId); } }
private void Button5_Click(object sender, EventArgs e) { DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); this.Hide(); Point3d point = CAD.GetPoint("选择插入点: "); checked { Point3d point3d; if (!(point == point3d)) { Point3d pointXY = CAD.GetPointXY(point, 50.0, -50.0); string text = this.TextBox1.Text; text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary); int num = (int)this.inStr_n(text, "&"); string[] array_ = new string[1]; Class36.smethod_44(text, ref array_, "&"); Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, ""); pointXY = CAD.GetPointXY(point, 3550.0, -50.0); text = this.TextBox2.Text; text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary); num = (int)Math.Max(unchecked ((long)num), this.inStr_n(text, "&")); array_ = new string[1]; Class36.smethod_44(text, ref array_, "&"); Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, ""); pointXY = CAD.GetPointXY(point, 13050.0, -50.0); text = this.TextBox3.Text; text = Strings.Replace(text, "\r\n", "&", 1, -1, CompareMethod.Binary); num = (int)Math.Max(unchecked ((long)num), this.inStr_n(text, "&")); array_ = new string[1]; Class36.smethod_44(text, ref array_, "&"); Class36.smethod_20(CAD.GetPointAngle(pointXY, 100.0, 0.0), array_, 300.0, 1.2, ""); if (num < 1) { num = 1; } num++; CAD.AddPlinePxy(point, 20000.0, (double)((0 - num) * 500), 0.0, ""); pointXY = CAD.GetPointXY(point, 3500.0, 0.0); Point3d pointXY2 = CAD.GetPointXY(point, 3500.0, (double)((0 - num) * 500)); CAD.AddLine(pointXY, pointXY2, "0"); pointXY = CAD.GetPointXY(point, 13000.0, 0.0); pointXY2 = CAD.GetPointXY(point, 13000.0, (double)((0 - num) * 500)); CAD.AddLine(pointXY, pointXY2, "0"); documentLock.Dispose(); this.Show(); } } }
public void flower(object r, object px, object py, object pi, object col) { object obj = checked ((int)Math.Round((double)(unchecked (8f - VBMath.Rnd(1f) * 5f)))); short num; if (Operators.ConditionalCompareObjectEqual(Operators.ModObject(obj, 2), 0, false)) { num = 2; } else { num = 1; } Point3d p = default(Point3d); Point3d point3d = default(Point3d); float num2 = 0f; float num3 = Conversions.ToSingle(Operators.AddObject(Operators.MultiplyObject(num, pi), Operators.DivideObject(pi, Operators.MultiplyObject(10, obj)))); float num4 = Conversions.ToSingle(Operators.DivideObject(pi, Operators.MultiplyObject(15, obj))); float limit = num3; float num5 = num2; while (ObjectFlowControl.ForLoopControl.ForNextCheckR4(num5, limit, num4)) { float num6 = Conversions.ToSingle(Operators.AddObject(Operators.MultiplyObject(Operators.AddObject(Operators.MultiplyObject(Operators.DivideObject(r, 4), Math.Sin(Conversions.ToDouble(Operators.MultiplyObject(Operators.MultiplyObject(3, obj), num5)))), Operators.MultiplyObject(r, Math.Sin(Conversions.ToDouble(Operators.MultiplyObject(obj, num5))))), Math.Cos((double)num5)), px)); float num7 = Conversions.ToSingle(Operators.AddObject(Operators.MultiplyObject(Operators.AddObject(Operators.MultiplyObject(Operators.DivideObject(r, 4), Math.Sin(Conversions.ToDouble(Operators.MultiplyObject(Operators.MultiplyObject(3, obj), num5)))), Operators.MultiplyObject(r, Math.Sin(Conversions.ToDouble(Operators.MultiplyObject(obj, num5))))), Math.Sin((double)num5)), py)); if (num5 == 0f) { Point3d p2; p2..ctor((double)num6, (double)num7, 0.0); CAD.AddPoint(p2); p..ctor((double)num6, (double)num7, 0.0); } else { point3d..ctor((double)num6, (double)num7, 0.0); CAD.AddLine(p, point3d, "0"); p..ctor((double)num6, (double)num7, 0.0); p = point3d; } num5 += num4; } }
public void TcFlower() { float[] array = new float[3]; float[] array2 = new float[3]; float[] array3 = new float[3]; object obj = 3.1415926535897931; object obj2 = 400; object obj3 = 300; object obj4 = 30; ColorRGB colorRGB; colorRGB..ctor(255.0, 0.0, 0.0); this.flower(RuntimeHelpers.GetObjectValue(obj4), RuntimeHelpers.GetObjectValue(obj2), RuntimeHelpers.GetObjectValue(obj3), RuntimeHelpers.GetObjectValue(obj), colorRGB); array[0] = 7f; array2[0] = 43.6f; array3[0] = 24.5f; array[1] = 17f; array2[1] = 77.5f; array3[1] = 18f; array[2] = 31f; array2[2] = 102f; array3[2] = 13f; object value = 0; VBMath.Randomize(Conversions.ToDouble(value)); short num = 0; do { object right = array[(int)num]; object left = array2[(int)num]; obj4 = array3[(int)num]; float num2; if (num == 2) { num2 = Conversions.ToSingle(Operators.DivideObject(Operators.MultiplyObject(2, obj), right)); } else { num2 = 0f; } float num3 = 0f; float num4 = Conversions.ToSingle(Operators.SubtractObject(Operators.MultiplyObject(2, obj), num2)); float num5 = Conversions.ToSingle(Operators.DivideObject(Operators.MultiplyObject(2, obj), right)); float limit = num4; float num6 = num3; while (ObjectFlowControl.ForLoopControl.ForNextCheckR4(num6, limit, num5)) { float num7 = Conversions.ToSingle(Operators.AddObject(obj2, Operators.MultiplyObject(left, Math.Cos((double)num6)))); float num8 = Conversions.ToSingle(Operators.AddObject(obj3, Operators.MultiplyObject(left, Math.Sin((double)num6)))); colorRGB..ctor(255.0, 255.0, 0.0); this.flower(RuntimeHelpers.GetObjectValue(obj4), num7, num8, RuntimeHelpers.GetObjectValue(obj), colorRGB); num6 += num5; } num += 1; }while (num <= 2); Point3d p = default(Point3d); Point3d point3d = default(Point3d); float num9 = 0f; float num10 = Conversions.ToSingle(Operators.MultiplyObject(14, obj)); float num11 = Conversions.ToSingle(Operators.DivideObject(obj, 60)); float limit2 = num10; float num12 = num9; while (ObjectFlowControl.ForLoopControl.ForNextCheckR4(num12, limit2, num11)) { float num13 = Conversions.ToSingle(Operators.AddObject(obj2, 144.0 * (1.0 + 0.2 * Math.Sin(9.06 * (double)num12)) * Math.Cos((double)num12))); float num14 = Conversions.ToSingle(Operators.AddObject(obj3, 144.0 * (1.0 + 0.2 * Math.Sin(9.06 * (double)num12)) * Math.Sin((double)num12))); if (num12 == 0f) { p..ctor((double)num13, (double)num14, 0.0); Point3d p2; p2..ctor((double)num13, (double)num14, 0.0); CAD.AddPoint(p2); } else { point3d..ctor((double)num13, (double)num14, 0.0); CAD.AddLine(p, point3d, "0"); p..ctor((double)num13, (double)num14, 0.0); p = point3d; } num12 += num11; } }
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 TcWuMian() { int num; int num18; object obj; try { IL_01: ProjectData.ClearProjectError(); num = -2; IL_09: int num2 = 2; long[] array = null; IL_0D: num2 = 3; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; IL_1A: num2 = 4; Database database = mdiActiveDocument.Database; IL_24: num2 = 5; using (Transaction transaction = database.TransactionManager.StartTransaction()) { TypedValue[] array2 = new TypedValue[1]; Array array3 = array2; TypedValue typedValue; typedValue..ctor(0, "TEXT"); array3.SetValue(typedValue, 0); SelectionFilter selectionFilter = new SelectionFilter(array2); Class36.smethod_60("请按照顺序选择>"); PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(selectionFilter); short num3; double num9; Point3d[] array4; short num15; checked { short num6; if (selection.Status == 5100) { SelectionSet value = selection.Value; num3 = (short)(value.Count - 1); array = new long[(int)(num3 + 1)]; short num4 = 0; short num5 = num3; num6 = num4; for (;;) { short num7 = num6; short num8 = num5; if (num7 > num8) { break; } DBText dbtext = (DBText)transaction.GetObject(value[(int)num6].ObjectId, 1); array[(int)num6] = (long)Math.Round(Conversion.Val(dbtext.TextString)); unchecked { num6 += 1; } } } num9 = Class36.smethod_30("请输入跨度(默认6000):", 6000.0); array4 = new Point3d[(int)(num3 + 1)]; array4[0] = CAD.GetPoint("选择插入点: "); Point3d point3d; if (array4[0] == point3d) { goto IL_5A1; } short num10 = 0; short num11 = (short)(Information.UBound(array, 1) - 1); num6 = num10; Point3d pointAngle; for (;;) { short num12 = num6; short num8 = num11; if (num12 > num8) { break; } pointAngle = CAD.GetPointAngle(array4[(int)num6], num9, 0.0); CAD.AddLine(array4[(int)num6], pointAngle, "0"); array4[(int)(num6 + 1)] = CAD.GetPointAngle(array4[(int)num6], (double)array[(int)num6], 270.0); unchecked { num6 += 1; } } pointAngle = CAD.GetPointAngle(array4[(int)num6], num9, 0.0); CAD.AddLine(array4[(int)num6], pointAngle, "0"); Point3d[] array5 = new Point3d[4]; Point3d[] array6 = new Point3d[4]; pointAngle = CAD.GetPointAngle(array4[0], num9, 0.0); array5[0] = CAD.GetPointAngle(array4[0], 200.0, 45.0); array5[1] = CAD.GetPointAngle(array4[0], 200.0, 315.0); array6[0] = CAD.GetPointAngle(pointAngle, 200.0, 135.0); array6[1] = CAD.GetPointAngle(pointAngle, 200.0, 225.0); pointAngle = CAD.GetPointAngle(array4[1], num9, 0.0); Point3d p = Class36.smethod_46(array4[1], pointAngle); array5[2] = CAD.GetPointAngle(p, 200.0, 135.0); array5[3] = CAD.GetPointAngle(p, 200.0, 225.0); array6[2] = CAD.GetPointAngle(p, 200.0, 45.0); array6[3] = CAD.GetPointAngle(p, 200.0, 315.0); Point3d pointAngle2 = CAD.GetPointAngle(p, 141.0, 90.0); Point3d pointAngle3 = CAD.GetPointAngle(p, (double)(array[0] + 141L), 270.0); CAD.AddPline(array5, 0.0, false, ""); CAD.AddPline(array6, 0.0, false, ""); CAD.AddLine(pointAngle2, pointAngle3, "0"); short num13 = (short)Math.Round(unchecked ((double)Information.UBound(array, 1) / 2.0 - 1.0)); short num14 = 1; num15 = num13 - 1; num3 = num14; } for (;;) { short num16 = num3; short num8 = num15; if (num16 > num8) { break; } Point3d pointAngle = CAD.GetPointAngle(array4[(int)num3], num9 / 2.0 + Math.Pow(-1.0, (double)num3) * 70.0, 0.0); Point3d pointAngle4 = CAD.GetPointAngle(pointAngle, (double)array[(int)num3], 270.0); CAD.AddLine(pointAngle, pointAngle4, "0"); num3 += 1; } transaction.Commit(); } IL_4FC: num2 = 7; if (Information.Err().Number <= 0) { goto IL_521; } IL_50D: num2 = 8; Interaction.MsgBox(Information.Err().Description, MsgBoxStyle.OkOnly, null); IL_521: goto IL_5A1; IL_523: int num17 = num18 + 1; num18 = 0; @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num17); IL_55B: goto IL_596; IL_55D: num18 = num2; if (num <= -2) { goto IL_523; } @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num); IL_573 :; } catch when(endfilter(obj is Exception & num != 0 & num18 == 0)) { Exception ex = (Exception)obj2; goto IL_55D; } IL_596: throw ProjectData.CreateProjectError(-2146828237); IL_5A1: if (num18 != 0) { ProjectData.ClearProjectError(); } }
public void DrawCengGaoBiao() { Class36.SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle); DocumentLock documentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(); Point3d point3d = CAD.GetPoint("选择插入点: "); checked { Point3d point3d2; if (!(point3d == point3d2)) { Class36.smethod_23(CAD.GetPointXY(point3d, 500.0, 150.0), "层号", 350.0, 0, ""); Class36.smethod_23(CAD.GetPointXY(point3d, 1800.0, 150.0), "层高(m)", 350.0, 0, ""); Class36.smethod_23(CAD.GetPointXY(point3d, 3300.0, 150.0), "标高(m)", 350.0, 0, ""); if (this.CheckBox1.Checked) { Class36.smethod_23(CAD.GetPointXY(point3d, 4800.0, 150.0), "墙柱砼", 350.0, 0, ""); } if (this.CheckBox1.Checked) { Class36.smethod_23(CAD.GetPointXY(point3d, 6300.0, 150.0), "梁板砼", 350.0, 0, ""); } short num = (short)this.DataGridView1.Rows.Count; CAD.AddLine(CAD.GetPointXY(point3d, 1500.0, 0.0), CAD.GetPointXY(point3d, 1500.0, (double)((num + 1) * 600)), "0"); CAD.AddLine(CAD.GetPointXY(point3d, 3000.0, 0.0), CAD.GetPointXY(point3d, 3000.0, (double)((num + 1) * 600)), "0"); if (this.CheckBox1.Checked) { CAD.AddLine(CAD.GetPointXY(point3d, 4500.0, 0.0), CAD.GetPointXY(point3d, 4500.0, (double)((num + 1) * 600)), "0"); } if (this.CheckBox1.Checked) { CAD.AddLine(CAD.GetPointXY(point3d, 6000.0, 0.0), CAD.GetPointXY(point3d, 6000.0, (double)((num + 1) * 600)), "0"); } long num2 = 5000L; if (this.CheckBox1.Checked) { num2 = 7500L; } CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)(num * 600)), CAD.GetPointXY(point3d, (double)num2, (double)(num * 600)), "0"); CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)((num - 1) * 600)), CAD.GetPointXY(point3d, (double)num2, (double)((num - 1) * 600)), "0"); num -= 2; string[] array = new string[(int)(num + 1)]; string[] array2 = new string[(int)(num + 1)]; string[] array3 = new string[(int)(num + 1 + 1)]; string[] array4 = new string[(int)(num + 1)]; string[] array5 = new string[(int)(num + 1 + 1)]; array5[0] = "-"; short num3 = 0; short num4 = num; short num5 = num3; for (;;) { short num6 = num5; short num7 = num4; if (num6 > num7) { break; } CAD.AddLine(CAD.GetPointXY(point3d, 0.0, (double)(num5 * 600)), CAD.GetPointXY(point3d, (double)num2, (double)(num5 * 600)), "0"); array[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[0].Value); double num8 = Conversions.ToDouble(Operators.DivideObject(this.DataGridView1.Rows[(int)num5].Cells[1].Value, 1000)); array2[(int)num5] = Strings.Format(num8, "0.000"); if (Operators.ConditionalCompareObjectEqual(this.DataGridView1.Rows[(int)num5].Cells[2].Value, "0.000", false)) { array3[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[2].Value); } else { array3[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[2].Value); } if (this.CheckBox1.Checked) { array4[(int)num5] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[3].Value); if (!array4[(int)num5].ToUpper().Contains("C")) { array4[(int)num5] = "C" + array4[(int)num5].ToUpper(); } else { array4[(int)num5] = array4[(int)num5].ToUpper(); } } if (this.CheckBox1.Checked) { array5[(int)(num5 + 1)] = Conversions.ToString(this.DataGridView1.Rows[(int)num5].Cells[4].Value); if (!array5[(int)(num5 + 1)].ToUpper().Contains("C")) { array5[(int)(num5 + 1)] = "C" + array5[(int)(num5 + 1)].ToUpper(); } else { array5[(int)(num5 + 1)] = array5[(int)(num5 + 1)].ToUpper(); } } unchecked { num5 += 1; } } double num9 = Conversions.ToDouble(Operators.AddObject(this.DataGridView1.Rows[(int)num].Cells[2].Value, Operators.DivideObject(this.DataGridView1.Rows[(int)num].Cells[1].Value, 1000))); array3[(int)(num + 1)] = Strings.Format(num9, "0.000"); Class36.smethod_21(CAD.GetPointXY(point3d, 1000.0, 150.0), array, 300.0, -2.0); Class36.smethod_20(CAD.GetPointXY(point3d, 1800.0, 150.0), array2, 300.0, -2.0, ""); Class36.smethod_21(CAD.GetPointXY(point3d, 4200.0, 150.0), array3, 300.0, -2.0); if (this.CheckBox1.Checked) { Class36.smethod_20(CAD.GetPointXY(point3d, 4800.0, 150.0), array4, 300.0, -2.0, ""); } if (this.CheckBox1.Checked) { Class36.smethod_20(CAD.GetPointXY(point3d, 6300.0, 150.0), array5, 300.0, -2.0, ""); } if (this.CheckBox1.Checked) { num2 = 3750L; } else { num2 = 2500L; } point3d = CAD.GetPointXY(point3d, (double)num2, -1500.0); Class36.smethod_24(point3d, "结构层高表", 500.0, 0, ""); point3d = CAD.GetPointXY(point3d, 0.0, -750.0); Class36.smethod_24(point3d, "注:标高均为楼面结构标高", 350.0, 0, ""); Point3d[] array6 = new Point3d[] { CAD.GetPointXY(point3d, -1500.0, 600.0), CAD.GetPointXY(point3d, 1500.0, 600.0) }; CAD.AddPline(array6, 75.0, false, ""); CAD.AddLine(CAD.GetPointAngle(array6[0], 125.0, -90.0), CAD.GetPointAngle(array6[1], 125.0, -90.0), "0"); documentLock.Dispose(); } } }
public void TcDuanMianByLine1() { Entity entity = null; Entity e = null; Document mdiActiveDocument = Application.DocumentManager.MdiActiveDocument; Database database = mdiActiveDocument.Database; Point3d entCenter; Line line; string text; checked { Point3d entCenter2; using (Transaction transaction = database.TransactionManager.StartTransaction()) { TypedValue[] array = new TypedValue[1]; Array array2 = array; TypedValue typedValue; typedValue..ctor(0, "LWPOLYLINE"); array2.SetValue(typedValue, 0); SelectionFilter selectionFilter = new SelectionFilter(array); PromptSelectionResult selection = mdiActiveDocument.Editor.GetSelection(selectionFilter); if (selection.Status != 5100) { return; } SelectionSet value = selection.Value; if (value.Count < 1) { return; } if (value.Count > 2) { entity = (Entity)transaction.GetObject(value[0].ObjectId, 0); e = (Entity)transaction.GetObject(value[value.Count - 1].ObjectId, 0); } else if (value.Count == 2) { entity = (Entity)transaction.GetObject(value[0].ObjectId, 0); e = (Entity)transaction.GetObject(value[1].ObjectId, 0); } entCenter = CAD.GetEntCenter(entity); entCenter2 = CAD.GetEntCenter(e); transaction.Commit(); } line = CAD.AddLine(entCenter, entCenter2, "0"); text = Interaction.InputBox("直接距离" + Conversions.ToString((long)Math.Round(line.Length)) + ",请输入分布的钢筋根数", "", "2", -1, -1); } if (Operators.CompareString(text, "", false) == 0) { Class36.smethod_64(line.ObjectId); } else { double num = line.Length / (Conversions.ToDouble(text) + 1.0); short num2 = 1; short num3 = Conversions.ToShort(text); short num4 = num2; for (;;) { short num5 = num4; short num6 = num3; if (num5 > num6) { break; } Point3d pointAtDist = line.GetPointAtDist(num * (double)num4); CAD.EntCopy(entity, entCenter, pointAtDist); num4 += 1; } Class36.smethod_64(line.ObjectId); } }