Beispiel #1
0
        public HbCurve Hb(LineCurve lineCurveRhino)
        {
            HbCurve hbCurve       = new HbCurve();
            Point3d xyzRhinoStart = lineCurveRhino.PointAtStart;
            Point3d xyzRhinoEnd   = lineCurveRhino.PointAtEnd;

            //Not sure why we get the midpoint here for a line object?
            //Point3d xyzRhinoMid = lineCurveRhino.PointAt(0.5);
            if (lineCurveRhino.IsLinear())
            {
                HbLine hbLineRevit = new HbLine();
                hbLineRevit.PointStart = new HbXYZ(xyzRhinoStart.X, xyzRhinoStart.Y, xyzRhinoStart.Z);
                hbLineRevit.PointEnd   = new HbXYZ(xyzRhinoEnd.X, xyzRhinoEnd.Y, xyzRhinoEnd.Z);
                hbCurve = hbLineRevit;
            }
            return(hbCurve);
        }