public static BeamJoint FromSpeckle(SpecklePoint BasePt)
        {
            var bj = new BeamJoint();

            bj.IntersectionPoint = BasePt.ToRhino();
            bj.A = BeamBase.FromSpeckle((SpeckleBrep)BasePt.Properties["BeamA"]);
            bj.B = BeamBase.FromSpeckle((SpeckleBrep)BasePt.Properties["BeamB"]);
            return(bj);
        }
Пример #2
0
        public override object ToNative(SpeckleObject _object)
        {
            if ((string)_object.Properties[GlobalVar.discriminator] == "BeamBase")
            {
                return(BeamBase.FromSpeckle(((SpeckleBrep)_object)));
            }
            if ((string)_object.Properties[GlobalVar.discriminator] == "DetailedBeam")
            {
                return(DetailedBeam.FromSpeckle(((SpeckleBrep)_object)));
            }
            if ((string)_object.Properties[GlobalVar.discriminator] == "BeamJoint")
            {
                return(BeamJoint.FromSpeckle(((SpecklePoint)_object)));
            }

            // Graceful fail
            using (RhinoConverter rhConv = new RhinoConverter())
                return(rhConv.ToNative(_object));
        }