700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Revit二次开发-创建楼板钢筋

Revit二次开发-创建楼板钢筋

时间:2022-04-01 12:01:43

相关推荐

Revit二次开发-创建楼板钢筋

Transaction transaction = new Transaction(document);transaction.Start("创建楼板钢筋");BoundingBoxXYZ secondBoundingBox = floor.get_BoundingBox(document.ActiveView);XYZ secondMin = secondBoundingBox.Min;XYZ secondMax = secondBoundingBox.Max;//楼板的长double floorLength = Math.Abs(secondMin.X - secondMax.X);//楼板的宽double floorWidth = Math.Abs(secondMin.Y - secondMax.Y);//板网片筋延伸长度double extend = 100 / 304.8;XYZ fristPoint = secondMin;XYZ secondPoint = new XYZ(secondMax.X, fristPoint.Y, fristPoint.Z);XYZ thirdPoint = new XYZ(fristPoint.X, secondMax.Y + extend, fristPoint.Z);Line fristLine = Line.CreateBound(fristPoint, secondPoint);Line secondLine = Line.CreateBound(fristPoint, thirdPoint);XYZ fristNormal = new XYZ(0, 1, 0);List<Curve> fristCurve = new List<Curve>();fristCurve.Add(fristLine);//横向钢筋型号RebarBarType fristBarType = RebarBarType.Create(document);//纵向钢筋型号RebarBarType secondBarType = RebarBarType.Create(document);Rebar fristRebar = Rebar.CreateFromCurves(document, RebarStyle.StirrupTie, fristBarType, null, null,floor, fristNormal, fristCurve, RebarHookOrientation.Right, RebarHookOrientation.Left, true, true);//横向钢筋间距double fristSpacing = 700/304.8;//阵列横向钢筋fristRebar.SetLayoutAsMaximumSpacing(fristSpacing, floorWidth, true, true, true);#endregion#region 创建纵向钢筋XYZ secondNormal = new XYZ(1, 0, 0);List<Curve> secondCurve = new List<Curve>();secondCurve.Add(secondLine);Rebar secondRebar = Rebar.CreateFromCurves(document, RebarStyle.StirrupTie, secondBarType, null, null,floor, secondNormal, secondCurve, RebarHookOrientation.Right, RebarHookOrientation.Left, true, true);//纵向钢筋间距double secondSpacing = 500 / 304.8;//阵列纵向钢筋secondRebar.SetLayoutAsMaximumSpacing(secondSpacing, floorLength, true, true, true);mit();#endregion

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。