Autodesk.Revit.DB.Structure.RebarShapeDefinitionByArc
是Revit API中一个用于定义通过弧线形成的钢筋形状的类。该类通过描述弧线的半径、角度和位置来确定钢筋的形状。
public class RebarShapeDefinitionByArc : RebarShapeDefinition
无
Radius
:double
StartAngle
:double
EndAngle
:double
Center
:XYZ
无
以下示例展示了如何使用RebarShapeDefinitionByArc
类创建一个弧线形状的钢筋定义。
// 创建一个由两个对称的弧线组成的钢筋定义。
var def = new RebarShapeDefinitionByArc();
def.Radius = 100;
def.StartAngle = 0;
def.EndAngle = 90;
def.Center = new XYZ(0, 0, 0);
var def2 = new RebarShapeDefinitionByArc();
def2.Radius = 100;
def2.StartAngle = 90;
def2.EndAngle = 180;
def2.Center = new XYZ(0, 0, 0);
var symDef = new RebarShapeDefinitionBySegments();
symDef.Segments.Add(def);
symDef.Segments.Add(def2);
symDef.IsSymmetric = true;
// 创建钢筋形状。
var shape = new RebarShape(Document);
shape.Definition = symDef;
shape.ShapeType = RebarShapeType.Regular;
shape.Name = "MyArcShape";
Transaction t = new Transaction(Document, "Create Rebar Shape");
t.Start();
Document.RebarShapeManager.AddShape(shape);
t.Commit();