Revit API:楼梯元素 Run、Landing、Support

前言

Revit 目前仅能创建组合楼梯,即所有楼梯都必须是梯段(Run)、平台(Landing)以及支撑(Support)组成。另外,栏杆扶手可以附着在它上面。

梯段 - Run

通过 API,可以创建直梯、螺旋楼梯、L或者U 形斜踏步梯段。前两者非常直接:
StairsRun 的静态方法:

public static StairsRun CreateSpiralRun(Document document, ElementId stairsId, XYZ center, double radius, double startAngle, double includedAngle, bool clockwise, StairsRunJustification justification);
public static StairsRun CreateStraightRun(Document document, ElementId stairsId, Line locationPath, StairsRunJustification justification);

L或者U 形斜踏步梯段,目前看来只能使用变通的方法,参考SDK中的 WinderStairs(需要再翻翻API文档),用 SketchRun 来代替:

public static StairsRun CreateSketchedRun(Document document, ElementId stairsId, double baseElevation, IList<Curve> boundaryCurves, IList<Curve> riserCurves, IList<Curve> stairsPath);
public static StairsRun CreateSketchedRunWithSlopeData(Document document, ElementId stairsId, double baseElevation, IList<SketchedStairsCurveData> boundaryCurves, IList<Curve> riserCurves, IList<Curve> stairsPath);

在这里插入图片描述在这里插入图片描述在这里插入图片描述

平台 - Landing

有两种创建平台构件的方式,通过拾取两个梯段创建平台构件或者通过绘制轮廓生成平台构件。
StairsLanding 拾取两个梯段创建平台构件相关的API:

public static bool CanCreateAutomaticLanding(Document document, ElementId firstRunId, ElementId secondRunId);
public static IList<ElementId> CreateAutomaticLanding(Document document, ElementId firstRunId, ElementId secondRunId);

StairsLanding 通过绘制轮廓生成平台构件相关的API:

public static StairsLanding CreateSketchedLanding(Document document, ElementId stairsId, CurveLoop curveLoop, double baseElevation);
public static StairsLanding CreateSketchedLandingWithSlopeData(Document document, ElementId stairsId, IList<SketchedStairsCurveData> curveLoop, double baseElevation);

支撑 - Support

Revit API 中没有针对于 Support 暴露类似 StairsSupport 的构件,它也不能队里创建,可以在梯段或者平台中进行设置。如果想要得到 Support 可以通过,StairsLanding.GetAllSupportsStairsRun.GetAllSupports 来获取与对应的平台或者 梯段相关联的支撑。也可通过它的类型Category来找到文档中的支撑,例如 OST_StairsStringerCarriage

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

极客BIM工作室

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值