Beispiel #1
0
        //public static ApertureEntity TryGetFrom(RhinoObject obj)
        //{
        //    return TryGetFrom(obj.Geometry);
        //}

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

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

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

            return(ent == null ? rc : ent);
        }
Beispiel #2
0
 public static ApertureEntity TryGetApertureEntity(this GeometryBase rhinoRef) => ApertureEntity.TryGetFrom(rhinoRef);
Beispiel #3
0
 public static ApertureEntity TryGetApertureEntity(this ObjRef rhinoRef) => ApertureEntity.TryGetFrom(rhinoRef.Geometry());
Beispiel #4
0
 public static bool IsAperture(this GeometryBase geometry) => ApertureEntity.TryGetFrom(geometry).IsValid;