zoukankan      html  css  js  c++  java
  • Revit二次开发 SweptProfile扫掠轮廓线

    SweptProfile扫掠轮廓线,在Revit二次开发中,我们经常要获取一个拉伸体对象的轮廓信息和方向等信息,特别对于梁和柱子,我们经常可以定义为如下:

     

    一个指定的截面,在指定的方向的延申。那么我们如何获取这个截面和这个界面的延申距离呢,则可以通过FamilyInstance实例的GetSweptProfile函数:

    public void GetProfile(Element element)
    {
        string messageInfo = "Profile : ";
        if (element is FamilyInstance)
        {
            FamilyInstance beam = element as FamilyInstance;
            if (beam.StructuralType == StructuralType.Beam)
            {
                //获取扫掠轮廓线
                Autodesk.Revit.DB.SweptProfile sweptProfile = beam.GetSweptProfile();
                //获取轮廓
                Autodesk.Revit.DB.Profile profile = sweptProfile.GetSweptProfile();
               //获取扫掠线
               Autodesk.Revit.DB.Curve curve= sweptProfile.GetDrivingCurve();
     
            }
        }
    }
    

    以上代码,就是通过GetSweptProfile函数,获取指定实例的轮廓信息和扫掠线信息。扫掠线就是当前族延申的方向和距离

  • 相关阅读:
    HTTP协议
    在项目中使用模块
    将封装模块发布到NPM注册表
    package.json文件常用指令说明
    npm常用命令
    分享wifi热点
    Globals模块常用的方法和属性
    WebStorm2016.1.1永久破解
    Module
    解释器模式(Interpreter Pattern)
  • 原文地址:https://www.cnblogs.com/minhost/p/12826564.html
Copyright © 2011-2022 走看看