Revit.SDK.Samples.ObjectViewer.CS.GeometryData.AddCurve C# (CSharp) Method

AddCurve() private method

generate data of a Curve
private AddCurve ( GeometryObject obj, Transform transform ) : void
obj GeometryObject
transform Transform
return void
        private void AddCurve(GeometryObject obj, Transform transform)
        {
            Curve curve = obj as Curve;
            if (null == curve)
            {
                return;
            }

            if (curve.IsBound)
            {
                List<XYZ> points = curve.Tessellate() as List<XYZ>;
                List<XYZ> result = new List<XYZ>();
                foreach (Autodesk.Revit.DB.XYZ point in points)
                {
                    Autodesk.Revit.DB.XYZ newPoint = MathUtil.GetBasis(point, transform);
                    result.Add(newPoint);
                }
                m_curve3Ds.Add(result);
            }
        }