public static ObjectId AddLeader(Point3dCollection pts, bool splBool) { Leader leader = new Leader(); leader.IsSplined = splBool; int num = 0; checked { int num2 = pts.Count - 1; int num3 = num; for (;;) { int num4 = num3; int num5 = num2; if (num4 > num5) { break; } leader.AppendVertex(pts[num3]); leader.SetVertexAt(num3, pts[num3]); num3++; } return(ModelSpace.AddEnt(leader)); } }
public static ObjectId AddDimRadial(Point3d cenPt, Point3d ptChord, double leaderLength) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; string text = "R" + Math.Round(cenPt.DistanceTo(ptChord), workingDatabase.Dimdec).ToString(); RadialDimension ent = new RadialDimension(cenPt, ptChord, leaderLength, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimAligned(Point3d pt1, Point3d pt2, Point3d ptText) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; string text = Math.Round(pt1.DistanceTo(pt2), workingDatabase.Dimdec).ToString(); AlignedDimension ent = new AlignedDimension(pt1, pt2, ptText, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimDiametric(Point3d ptChord1, Point3d ptChord2, double leaderLength) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; string text = "%%c" + Math.Round(ptChord1.DistanceTo(ptChord2), workingDatabase.Dimdec).ToString(); DiametricDimension ent = new DiametricDimension(ptChord1, ptChord2, leaderLength, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimLineAngular(Point3d line1StartPt, Point3d point3d_0, Point3d line2StartPt, Point3d point3d_1, Point3d arcPt) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; Vector3d vector3d = point3d_0 - line1StartPt; Vector3d vector3d2 = point3d_1 - line2StartPt; double value = vector3d.GetAngleTo(vector3d2) * 180.0 / 3.1415926535897931; string text = Math.Round(value, workingDatabase.Dimadec).ToString() + "%%d"; LineAngularDimension2 ent = new LineAngularDimension2(line1StartPt, point3d_0, line2StartPt, point3d_1, arcPt, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimLineAngular(Point3d cenPt, Point3d line1Pt, Point3d line2Pt, Point3d arcPt) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; Vector3d vector3d = line1Pt - cenPt; Vector3d vector3d2 = line2Pt - cenPt; double value = vector3d.GetAngleTo(vector3d2, vector3d) * 180.0 / 3.1415926535897931; string text = Math.Round(value, workingDatabase.Dimadec).ToString() + "%%d"; Point3AngularDimension ent = new Point3AngularDimension(cenPt, line1Pt, line2Pt, arcPt, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimArc(Point3d cenPt, Point3d pt1, Point3d pt2, Point3d arcPt) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; Vector3d vectorTo = cenPt.GetVectorTo(pt1); Vector3d vectorTo2 = cenPt.GetVectorTo(pt2); double angleTo = vectorTo.GetAngleTo(vectorTo2); double num = cenPt.DistanceTo(pt1); double value = angleTo * num; string text = Conversions.ToString(Math.Round(value, workingDatabase.Dimdec)); ArcDimension ent = new ArcDimension(cenPt, pt1, pt2, arcPt, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimAligned1(Point3d pt1, Point3d pt2, Point3d ptText, string text, ObjectId style) { AlignedDimension alignedDimension = new AlignedDimension(); alignedDimension.SetDatabaseDefaults(); alignedDimension.XLine1Point = pt1; alignedDimension.XLine2Point = pt2; alignedDimension.DimLinePoint = ptText; alignedDimension.Dimlfac = 1.0; alignedDimension.DimensionStyle = style; if (Operators.CompareString(text, "", false) != 0) { alignedDimension.DimensionText = text; } return(ModelSpace.AddEnt(alignedDimension)); }
public static ObjectId AddDimRotated(double angle, Point3d pt1, Point3d pt2, Point3d ptText) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; Point2d point2d; point2d..ctor(pt1.X, pt1.Y); Point2d point2d2; point2d2..ctor(pt2.X, pt2.Y); Vector2d vector2d = point2d2 - point2d; string text = Math.Round(Math.Abs(vector2d.Length * Math.Cos(vector2d.Angle - angle)), workingDatabase.Dimdec).ToString(); RotatedDimension ent = new RotatedDimension(angle, pt1, pt2, ptText, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectIdCollection AddDimOrdinate(Point3d ordPt, Point3d ptX, Point3d ptY) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; string text = Math.Round(ordPt.X, workingDatabase.Dimdec).ToString(); string text2 = Math.Round(ordPt.Y, workingDatabase.Dimdec).ToString(); OrdinateDimension ent = new OrdinateDimension(true, ordPt, ptX, text, dimstyle); OrdinateDimension ent2 = new OrdinateDimension(false, ordPt, ptY, text2, dimstyle); ObjectId objectId = ModelSpace.AddEnt(ent); ObjectId objectId2 = ModelSpace.AddEnt(ent2); ObjectIdCollection objectIdCollection = new ObjectIdCollection(); objectIdCollection.Add(objectId); objectIdCollection.Add(objectId2); return(objectIdCollection); }
public static ObjectId smethod_0(Point3dCollection pts) { ObjectId result; try { Polyline3d ent = new Polyline3d(0, pts, false); ObjectId objectId = ModelSpace.AddEnt(ent); result = objectId; } catch (Exception ex) { ObjectId @null = ObjectId.Null; result = @null; } return(result); }
public static ObjectId AddDimOrdinate(bool useXAxis, Point3d ordPt, Point3d pt) { Database workingDatabase = HostApplicationServices.WorkingDatabase; ObjectId dimstyle = workingDatabase.Dimstyle; string text; if (useXAxis) { text = Math.Round(ordPt.X, workingDatabase.Dimdec).ToString(); } else { text = Math.Round(ordPt.Y, workingDatabase.Dimdec).ToString(); } OrdinateDimension ent = new OrdinateDimension(useXAxis, ordPt, pt, text, dimstyle); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddMtext(Point3d location, string textString, double height, double width) { ObjectId result; try { ObjectId objectId = ModelSpace.AddEnt(new MText { Location = location, Contents = textString, TextHeight = height, Width = width }); result = objectId; } catch (Exception ex) { ObjectId @null = ObjectId.Null; result = @null; } return(result); }
public static ObjectId AddText(Point3d position, string textString, double height, double oblique) { ObjectId result; try { ObjectId objectId = ModelSpace.AddEnt(new DBText { Position = position, TextString = textString, Height = height, Oblique = oblique }); result = objectId; } catch (Exception ex) { ObjectId @null = ObjectId.Null; result = @null; } return(result); }
public static ObjectId AddPline(Point3dCollection pts, double width) { checked { ObjectId result; try { int count = pts.Count; Polyline polyline = new Polyline(count); int num = 0; int num2 = count - 1; int num3 = num; for (;;) { int num4 = num3; int num5 = num2; if (num4 > num5) { break; } Polyline polyline2 = polyline; int num6 = num3; Point2d point2d; point2d..ctor(pts[num3].X, pts[num3].Y); polyline2.AddVertexAt(num6, point2d, 0.0, width, width); num3++; } ObjectId objectId = ModelSpace.AddEnt(polyline); result = objectId; } catch (Exception ex) { ObjectId @null = ObjectId.Null; result = @null; } return(result); } }
public static ObjectId AddCircle(Point2d pt1, Point2d pt2, Point2d pt3) { Vector2d vectorTo = pt1.GetVectorTo(pt2); Vector2d vectorTo2 = pt1.GetVectorTo(pt3); ObjectId result; if (vectorTo.GetAngleTo(vectorTo2) == 0.0 | vectorTo.GetAngleTo(vectorTo2) == 3.1415926535897931) { ObjectId @null = ObjectId.Null; result = @null; } else { CircularArc2d circularArc2d = new CircularArc2d(pt1, pt2, pt3); Point3d point3d; point3d..ctor(circularArc2d.Center.X, circularArc2d.Center.Y, 0.0); double radius = circularArc2d.Radius; Circle ent = new Circle(point3d, Vector3d.ZAxis, radius); ObjectId objectId = ModelSpace.AddEnt(ent); result = objectId; } return(result); }
public static ObjectIdCollection AddDimOrdinate(Point3d ordPt, Point3d ptX, Point3d ptY, string textX, string textY, ObjectId style) { ObjectIdCollection result; try { OrdinateDimension ent = new OrdinateDimension(true, ordPt, ptX, textX, style); OrdinateDimension ent2 = new OrdinateDimension(false, ordPt, ptY, textY, style); ObjectId objectId = ModelSpace.AddEnt(ent); ObjectId objectId2 = ModelSpace.AddEnt(ent2); ObjectIdCollection objectIdCollection = new ObjectIdCollection(); objectIdCollection.Add(objectId); objectIdCollection.Add(objectId2); result = objectIdCollection; } catch (Exception ex) { ObjectId @null = ObjectId.Null; ObjectIdCollection objectIdCollection2 = new ObjectIdCollection(); objectIdCollection2.Add(@null); result = objectIdCollection2; } return(result); }
public static ObjectId AddTolerance(string codes, Point3d inPt, Vector3d norVec, Vector3d xVec) { FeatureControlFrame ent = new FeatureControlFrame(codes, inPt, norVec, xVec); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddArc(Point3d cenPt, double radius, double startAng, double endAng) { Arc ent = new Arc(cenPt, radius, startAng, endAng); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddCircle(Point3d cenPt, double radius) { Circle ent = new Circle(cenPt, Vector3d.ZAxis, radius); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimDiametric(Point3d ptChord1, Point3d ptChord2, double leaderLength, string text, ObjectId style) { DiametricDimension ent = new DiametricDimension(ptChord1, ptChord2, leaderLength, text, style); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimArc(Point3d cenPt, Point3d pt1, Point3d pt2, Point3d arcPt, string text, ObjectId style) { ArcDimension ent = new ArcDimension(cenPt, pt1, pt2, arcPt, text, style); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimLineAngular(Point3d cenPt, Point3d line1Pt, Point3d line2Pt, Point3d arcPt, string text, ObjectId style) { Point3AngularDimension ent = new Point3AngularDimension(cenPt, line1Pt, line2Pt, arcPt, text, style); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimLineAngular(Point3d line1StartPt, Point3d point3d_0, Point3d line2StartPt, Point3d point3d_1, Point3d arcPt, string text, ObjectId style) { LineAngularDimension2 ent = new LineAngularDimension2(line1StartPt, point3d_0, line2StartPt, point3d_1, arcPt, text, style); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimRotated1(double Ang, Point3d Pt1, Point3d Pt2, Point3d PtText, string text, ObjectId style) { RotatedDimension ent = new RotatedDimension(Ang, Pt1, Pt2, PtText, text, style); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddEllipse(Point3d cenPt, Vector3d majorAxis, double radiusRatio) { Ellipse ent = new Ellipse(cenPt, Vector3d.ZAxis, majorAxis, radiusRatio, 0.0, 6.2831853071795862); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddSpline(Point3dCollection pts) { Spline ent = new Spline(pts, 4, 0.0); return(ModelSpace.AddEnt(ent)); }
public static ObjectId AddDimOrdinate(bool useXAxis, Point3d ordPt, Point3d pt, string text, ObjectId style) { OrdinateDimension ent = new OrdinateDimension(useXAxis, ordPt, pt, text, style); return(ModelSpace.AddEnt(ent)); }
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 static ObjectId AddDimRadial(Point3d cenPt, Point3d ptChord, double leaderLength, string text, ObjectId style) { RadialDimension ent = new RadialDimension(cenPt, ptChord, leaderLength, text, style); return(ModelSpace.AddEnt(ent)); }