public new static DoorEntity TryGetFrom(Rhino.Geometry.GeometryBase rhinoGeo)
        {
            var rc = new DoorEntity();

            if (rhinoGeo == null)
            {
                return(rc);
            }
            if (!rhinoGeo.IsValid)
            {
                return(rc);
            }

            var ent = rhinoGeo.UserData.Find(typeof(DoorEntity)) as DoorEntity;

            return(ent == null ? rc : ent);
        }
示例#2
0
 public static DoorEntity TryGetDoorEntity(this GeometryBase rhinoRef) => DoorEntity.TryGetFrom(rhinoRef);
示例#3
0
 public static DoorEntity TryGetDoorEntity(this ObjRef rhinoRef) => DoorEntity.TryGetFrom(rhinoRef.Geometry());
示例#4
0
 public static bool IsDoor(this GeometryBase geometry) => DoorEntity.TryGetFrom(geometry).IsValid;