Beispiel #1
0
        public static Autodesk.DesignScript.Geometry.PolyCurve ToProtoType(this Autodesk.Revit.DB.PolyLine geom,
                                                                           bool performHostUnitConversion = true)
        {
            var converted = PolyCurve.ByPoints(geom.GetCoordinates().Select(x => Autodesk.DesignScript.Geometry.Point.ByCoordinates(x.X, x.Y, x.Z)).ToArray());

            return(performHostUnitConversion ? converted.InDynamoUnits() : converted);
        }
Beispiel #2
0
 public static Autodesk.DesignScript.Geometry.PolyCurve ToProtoType(this Autodesk.Revit.DB.PolyLine geom)
 {
     return(PolyCurve.ByPoints(geom.GetCoordinates().Select(x => Autodesk.DesignScript.Geometry.Point.ByCoordinates(x.X, x.Y, x.Z)).ToArray()));
 }
Beispiel #3
0
 private static Autodesk.DesignScript.Geometry.NurbsCurve Convert(Autodesk.Revit.DB.PolyLine crv)
 {
     return
         (Autodesk.DesignScript.Geometry.NurbsCurve.ByControlPoints(
              crv.GetCoordinates().Select(x => x.ToPoint()).ToArray(), 1));
 }
Beispiel #4
0
 private static Autodesk.DesignScript.Geometry.PolyCurve Convert(Autodesk.Revit.DB.PolyLine crv)
 {
     return
         (Autodesk.DesignScript.Geometry.PolyCurve.ByPoints(crv.GetCoordinates().Select(x => x.ToPoint(false))));
 }
Beispiel #5
0
 public static PolylineCurve ToRhino(DB.PolyLine polyline)
 {
     return(new PolylineCurve(polyline.GetCoordinates().Select(x => AsPoint3d(x))));
 }
Beispiel #6
0
 /// <summary>
 /// Convert a Revit polyline to a Nucleus one
 /// </summary>
 /// <param name="polyLine">The polyline to convert</param>
 /// <returns></returns>
 public static FB.PolyLine Convert(AD.PolyLine polyLine)
 {
     return(new FB.PolyLine(Convert(polyLine.GetCoordinates())));
 }
Beispiel #7
0
 public static PolylineCurve ToRhino(this DB.PolyLine polyline)
 {
     return(new PolylineCurve(polyline.GetCoordinates().ToRhino()));
 }
 private static Autodesk.DesignScript.Geometry.PolyCurve InternalConvert(Autodesk.Revit.DB.PolyLine geom)
 {
     return(PolyCurve.ByPoints(geom.GetCoordinates().Select(x => Point.ByCoordinates(x.X, x.Y, x.Z)).ToArray()));
 }