当前位置: 首页>>代码示例>>C#>>正文


C# Wall.GetAnalyticalModel方法代码示例

本文整理汇总了C#中Wall.GetAnalyticalModel方法的典型用法代码示例。如果您正苦于以下问题:C# Wall.GetAnalyticalModel方法的具体用法?C# Wall.GetAnalyticalModel怎么用?C# Wall.GetAnalyticalModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wall的用法示例。


在下文中一共展示了Wall.GetAnalyticalModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetWallGeom

        /// <summary>
        /// get necessary data when create AreaReinforcement on a straight wall
        /// </summary>
        /// <param name="wall">wall on which to create AreaReinforcemen</param>
        /// <param name="refer">reference of the vertical straight face on the wall</param>
        /// <param name="curves">curves compose the vertical face of the wall</param>
        /// <returns>is successful</returns>
        public bool GetWallGeom(Wall wall, ref Reference refer, ref CurveArray curves)
        {
            FaceArray faces = GeomUtil.GetFaces(wall);
            LocationCurve locCurve = wall.Location as LocationCurve;
            //unless API has bug, locCurve can't be null
            if (null == locCurve)
            {
                return false;
            }
            //check the location is line
            Line locLine = locCurve.Curve as Line;
            if (null == locLine)
            {
                return false;
            }

            //get the face reference
            foreach (Face face in faces)
            {
                if (GeomUtil.IsParallel(face, locLine))
                {
                    refer = face.Reference;
                    break;
                }
            }
            //can't find proper reference
            if (null == refer)
            {
                return false;
            }

            //check the analytical model profile is rectangular
            AnalyticalModel model = wall.GetAnalyticalModel() ;
            if (null == model)
            {
                return false;
            }

            IList<Curve> curveList   = model.GetCurves(AnalyticalCurveType.ActiveCurves);
            curves = m_currentDoc.Application.Create.NewCurveArray();
            foreach (Curve curve in curveList)
            {
                curves.Append(curve);
            }
            if (!GeomUtil.IsRectangular(curves))
            {
                return false;
            }

            return true;
        }
开发者ID:AMEE,项目名称:revit,代码行数:58,代码来源:GeomHelper.cs

示例2: Stream

        private void Stream( ArrayList data, Wall wall )
        {
            data.Add( new Snoop.Data.ClassSeparator( typeof( Wall ) ) );

              data.Add( new Snoop.Data.Double( "Width", wall.Width ) );
              data.Add( new Snoop.Data.Object( "Wall type", wall.WallType ) );
              data.Add( new Snoop.Data.Bool( "Flipped", wall.Flipped ) );

              /// uncomment this to see the length of the wall
              //data.Add(new Snoop.Data.Double("Length", wall.get_Parameter( Autodesk.Revit.Parameters.BuiltInParameter.CURVE_ELEM_LENGTH).AsDouble()));

              // TBD: Curtain Wall throws an exception when the Orientation property is accessed
              // Exception of type 'System.Exception' is thrown.
              //if (wall.WallType.Kind != WallType.WallKind.Curtain)

              try
              {
            data.Add( new Snoop.Data.Xyz( "Orientation", wall.Orientation ) );
              }
              catch( Exception ex )
              {
            data.Add( new Snoop.Data.Exception( "Orientation", ex ) );
              }

              data.Add( new Snoop.Data.Object( "Curtain grid", wall.CurtainGrid ) );
              data.Add( new Snoop.Data.String( "Structural usage", wall.StructuralUsage.ToString() ) );

              // TBD: Crash-Assert if called on Non-Bearing wall (seems a little harsh)
              //if (wall.StructuralUsage != WallUsage.NonBearing)
              data.Add( new Snoop.Data.Object( "Anaylytical model", wall.GetAnalyticalModel() ) );
        }
开发者ID:huni35,项目名称:RevitLookup,代码行数:31,代码来源:CollectorExtElement.cs


注:本文中的Wall.GetAnalyticalModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。