예제 #1
0
        public new static ShadeEntity TryGetFrom(Rhino.Geometry.GeometryBase rhinoGeo)
        {
            var rc = new ShadeEntity();

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

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

            return(ent == null ? rc : ent);
        }
예제 #2
0
 public static ShadeEntity TryGetShadeEntity(this GeometryBase rhinoRef) => ShadeEntity.TryGetFrom(rhinoRef);
예제 #3
0
 public static ShadeEntity TryGetShadeEntity(this ObjRef rhinoRef) => ShadeEntity.TryGetFrom(rhinoRef.Geometry());