Beispiel #1
0
        public static Plane ToSAM(this HoneybeeSchema.Plane plane)
        {
            if (plane == null)
            {
                return(null);
            }

            Point3D origin = plane.O?.ToSAM();

            if (origin == null || !origin.IsValid())
            {
                return(null);
            }

            Vector3D normal = plane.N?.ToSAM_Vector3D();

            if (normal == null || !normal.IsValid())
            {
                return(null);
            }

            Vector3D axisX = plane.X?.ToSAM_Vector3D();

            if (axisX == null || !normal.IsValid())
            {
                return(new Plane(origin, normal));
            }

            Vector3D axisY = normal.AxisY(axisX);

            return(new Plane(origin, axisX, axisY));
        }
Beispiel #2
0
 public static Ladybug.Geometry.Plane ToLBG(this HoneybeeSchema.Plane geo)
 {
     return(new Ladybug.Geometry.Plane(geo.N, geo.O, geo.X));
 }