Esempio n. 1
0
        /// <summary>
        /// Tessellate the curves of path reinforcement.
        /// </summary>
        private void Tessellate()
        {
            Options option = new Options();

            option.DetailLevel = ViewDetailLevel.Fine;
            Autodesk.Revit.DB.GeometryElement geoElem = m_pathRein.get_Geometry(option);
            //GeometryObjectArray geoArray = geoElem.Objects;
            IEnumerator <GeometryObject> Objects = geoElem.GetEnumerator();

            //foreach (GeometryObject geo in geoArray)
            while (Objects.MoveNext())
            {
                GeometryObject geo = Objects.Current;

                if (geo is Curve)
                {
                    Curve curve = geo as Curve;
                    m_curves.Add(curve.Tessellate() as List <XYZ>);
                }
            }

            IList <ElementId> curveIds = m_pathRein.GetCurveElementIds();

            foreach (ElementId id in curveIds)
            {
                ModelCurve modelCurve = m_commandData.Application.ActiveUIDocument.Document.GetElement(id) as ModelCurve;
                m_path.Add(modelCurve.GeometryCurve.Tessellate() as List <XYZ>);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Tessellate the curves of path reinforcement.
        /// </summary>
        private void Tessellate()
        {
            Options option = new Options();

            option.DetailLevel = DetailLevels.Fine;
            Autodesk.Revit.DB.GeometryElement geoElem = m_pathRein.get_Geometry(option);
            GeometryObjectArray geoArray = geoElem.Objects;

            foreach (GeometryObject geo in geoArray)
            {
                if (geo is Curve)
                {
                    Curve curve = geo as Curve;
                    m_curves.Add(curve.Tessellate() as List <XYZ>);
                }
            }

            foreach (ModelCurve modelCurve in m_pathRein.Curves)
            {
                m_path.Add(modelCurve.GeometryCurve.Tessellate() as List <XYZ>);
            }
        }