Exemplo n.º 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);
        }
Exemplo n.º 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()));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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))));
 }
Exemplo n.º 5
0
 public static PolylineCurve ToRhino(DB.PolyLine polyline)
 {
     return(new PolylineCurve(polyline.GetCoordinates().Select(x => AsPoint3d(x))));
 }
Exemplo n.º 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())));
 }
Exemplo n.º 7
0
 public static PolylineCurve ToRhino(this DB.PolyLine polyline)
 {
     return(new PolylineCurve(polyline.GetCoordinates().ToRhino()));
 }
Exemplo n.º 8
0
 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()));
 }