Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static DoorEntity TryGetDoorEntity(this GeometryBase rhinoRef) => DoorEntity.TryGetFrom(rhinoRef);
Exemplo n.º 3
0
 public static DoorEntity TryGetDoorEntity(this ObjRef rhinoRef) => DoorEntity.TryGetFrom(rhinoRef.Geometry());
Exemplo n.º 4
0
 public static bool IsDoor(this GeometryBase geometry) => DoorEntity.TryGetFrom(geometry).IsValid;