Esempio n. 1
0
        public static BoundingBox ToBoundingBox(this DB.BoundingBoxXYZ value, out Transform transform)
        {
            var rhino = RawDecoder.AsBoundingBox(value, out transform);

            UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits);
            UnitConverter.Scale(ref transform, UnitConverter.ToRhinoUnits);
            return(rhino);
        }
Esempio n. 2
0
        public static Box ToBox(this DB.BoundingBoxXYZ value)
        {
            var rhino = RawDecoder.AsBoundingBox(value, out var transform);

            UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits);
            UnitConverter.Scale(ref transform, UnitConverter.ToRhinoUnits);

            return(new Box
                   (
                       new Plane
                       (
                           origin:    new Point3d(transform.M03, transform.M13, transform.M23),
                           xDirection: new Vector3d(transform.M00, transform.M10, transform.M20),
                           yDirection: new Vector3d(transform.M01, transform.M11, transform.M21)
                       ),
                       xSize: new Interval(rhino.Min.X, rhino.Max.X),
                       ySize: new Interval(rhino.Min.Y, rhino.Max.Y),
                       zSize: new Interval(rhino.Min.Z, rhino.Max.Z)
                   ));
        }
Esempio n. 3
0
 public static Transform ToTransform(this DB.Transform value)
 {
     var rhino = RawDecoder.AsTransform(value); UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 4
0
 public static Point3d ToPoint3d(this DB.XYZ value)
 {
     var rhino = RawDecoder.AsPoint3d(value); UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 5
0
 public static Plane ToPlane(this DB.Plane value)
 {
     var rhino = RawDecoder.AsPlane(value); UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 6
0
 public static PolylineCurve ToPolylineCurve(this DB.PolyLine value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 7
0
 public static Brep ToBrep(this DB.Solid value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 8
0
 public static Curve ToCurve(this DB.Curve value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
Esempio n. 9
0
 public static Point ToPoint(this DB.Point value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
 public static Mesh ToMesh(this DB.Mesh value)
 {
     var rhino = MeshDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
 public static BoundingBox ToBoundingBox(this DB.BoundingBoxXYZ value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits); return(rhino);
 }
 public static Vector3d ToVector3d(this DB.XYZ value)
 {
     var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(ref rhino, UnitConverter.ToRhinoUnits); return((Vector3d)rhino);
 }