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


C# Floor.GetAnalyticalModel方法代码示例

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


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

示例1: Stream

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

              AnalyticalModel analyticalModel = floor.GetAnalyticalModel();

              data.Add( new Snoop.Data.Object( "Floor type", floor.FloorType ) );
              data.Add( new Snoop.Data.Object( "Analytical model", analyticalModel ) );
              data.Add( new Snoop.Data.String( "Structural usage", analyticalModel != null ? analyticalModel.GetAnalyzeAs().ToString() : null ) );
              data.Add( new Snoop.Data.Enumerable( "Span direction symbols", floor.GetSpanDirectionSymbolIds(), floor.Document ) );

              // Works only for Revit Structure

              if( analyticalModel != null )
              {
            data.Add( new Snoop.Data.Angle( "Span direction angle", floor.SpanDirectionAngle ) );
              }

              data.Add( new Snoop.Data.Object( "Slab shape editor", floor.SlabShapeEditor ) );
        }
开发者ID:huni35,项目名称:RevitLookup,代码行数:20,代码来源:CollectorExtElement.cs

示例2: GetFloorGeom

        /// <summary>
        /// get necessary data when create AreaReinforcement on a horizontal floor
        /// </summary>
        /// <param name="floor">floor on which to create AreaReinforcemen</param>
        /// <param name="refer">reference of the horizontal face on the floor</param>
        /// <param name="curves">curves compose the horizontal face of the floor</param>
        /// <returns>is successful</returns>
        public bool GetFloorGeom(Floor floor, ref Reference refer, ref CurveArray curves)
        {
            //get horizontal face reference
            FaceArray faces = GeomUtil.GetFaces(floor);
            foreach (Face face in faces)
            {
                if (GeomUtil.IsHorizontalFace(face))
                {
                    refer = face.Reference;
                    break;
                }
            }
            //no proper reference
            if (null == refer)
            {
                return false;
            }

            //check the analytical model profile is rectangular
            AnalyticalModel model = floor.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,代码行数:44,代码来源:GeomHelper.cs

示例3: GetFloorProfile

        /// <summary>
        /// Get a floor's profile.
        /// </summary>
        /// <param name="floor">The floor whose profile you want to get.</param>
        /// <returns>The profile of the floor.</returns>
        private CurveArray GetFloorProfile(Floor floor)
        {
            CurveArray floorProfile = new CurveArray();
            // Structural slab's profile can be found in it's AnalyticalModel.
            if (null != floor.GetAnalyticalModel())
            {
                AnalyticalModel analyticalModel = floor.GetAnalyticalModel();
                IList<Curve> curveList= analyticalModel.GetCurves(AnalyticalCurveType.ActiveCurves);
                for (int i = 0; i < curveList.Count; i++)
                {
                   floorProfile.Append(curveList[i]);
                }

                return floorProfile;
            }

            // Nonstructural floor's profile can be formed through it's Geometry.
            Options aOptions = m_revit.Application.Create.NewGeometryOptions();
            Autodesk.Revit.DB.GeometryElement aElementOfGeometry = floor.get_Geometry(aOptions);
            GeometryObjectArray geometryObjects = aElementOfGeometry.Objects;
            foreach (GeometryObject o in geometryObjects)
            {
                Solid solid = o as Solid;
                if (null == solid)
                    continue;

                // Form the floor's profile through solid's edges.
                EdgeArray edges = solid.Edges;
                for (int i = 0; i < (edges.Size) / 3; i++)
                {
                    Edge edge = edges.get_Item(i);
                    List<XYZ> xyzArray = edge.Tessellate() as List<XYZ>;  // A set of points.
                    for (int j = 0; j < (xyzArray.Count - 1); j++)
                    {
                        Autodesk.Revit.DB.XYZ startPoint = xyzArray[j];
                        Autodesk.Revit.DB.XYZ endPoint = xyzArray[j + 1];
                        Line line = CreApp.NewLine(startPoint, endPoint,true);

                        floorProfile.Append(line);
                    }
                }
            }
            return floorProfile;
        }
开发者ID:AMEE,项目名称:revit,代码行数:49,代码来源:SlabData.cs


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