Autodesk.Revit.DB.CurveElementType是Revit API中的一种枚举类型,用于表示线条元素的类型。
| 成员 | 描述 |
|---|---|
| Line | 直线 |
| Arc | 圆弧 |
| Ellipse | 椭圆 |
| NurbSpline | NURBS样条线 |
| HermiteSpline | Hermite样条线 |
| EllipticalArc | 椭圆弧 |
| Spline | 样条线 |
| ChamferLine | 倒角线 |
| TangentArc | 切线弧 |
| BezierCurve | Bezier曲线 |
| Polyline | 多段折线 |
| Nub | NURBS起始控制点 |
| Merge | 线条合并 |
以下示例演示了如何获取线条元素的类型:
Curve curve = // 获取线条元素
CurveElementType curveType = curve.CurveElementType;
switch (curveType)
{
case CurveElementType.Line:
// 处理直线
break;
case CurveElementType.Arc:
// 处理圆弧
break;
// ...
}