Revit SDK 介绍:CurtainWallGrid 幕墙网格

前言

这个例子介绍如何创建幕墙,以及如何通过 API 编辑幕墙。

内容

运行效果:
在这里插入图片描述

创建幕墙

幕墙在 Revit 体系里面属于墙的一种,因此,它对应的 API 类型仍然为 Wall,只是类型有差异。

// WallGeometry::CreateCurtainWall
baseline = Line.CreateBound(m_startXYZ, m_endXYZ);
Wall wall = Wall.Create(m_myDocument.Document, baseline, m_selectedWallType.Id, m_selectedView.GenLevel.Id, 20, 0, false, false);

获取幕墙网格

namespace Autodesk.Revit.DB
{
    public class Wall : HostObject
    {
        public CurtainGrid CurtainGrid { get; }
    	// 省略其它
    }
}

和幕墙网格编辑相关的接口都在 CurtainGrid,包括网格线的增减、幕墙单元的操作等 :

namespace Autodesk.Revit.DB
{
    public class CurtainGrid : APIObject
    {
        public CurtainGridAlignType Grid1Justification { get; set; }
        public double Grid1Offset { get; set; }
        public CurtainGridAlignType Grid2Justification { get; set; }
        public double Grid2Angle { get; set; }
        public double Grid2Offset { get; set; }
        public int NumULines { get; }
        public int NumVLines { get; }
        public int NumPanels { get; }
        public double Grid1Angle { get; set; }
        public CurtainGridLine AddGridLine(bool isUGridLine, XYZ position, bool oneSegmentOnly);
        public Element ChangePanelType(Element panel, ElementType newSymbol);
        public CurtainCell GetCell(ElementId uGridLineId, ElementId vGridLineId);
        public ICollection<CurtainCell> GetCurtainCells();
        public ICollection<ElementId> GetMullionIds();
        public Panel GetPanel(ElementId uGridLineId, ElementId vGridLineId);
        public ICollection<ElementId> GetPanelIds();
        public ICollection<ElementId> GetUGridLineIds();
        public ICollection<ElementId> GetUnlockedMullionIds();
        public ICollection<ElementId> GetUnlockedPanelIds();
        public ICollection<ElementId> GetVGridLineIds();
    }
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值