//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); }
public static ApertureEntity TryGetApertureEntity(this GeometryBase rhinoRef) => ApertureEntity.TryGetFrom(rhinoRef);
public static ApertureEntity TryGetApertureEntity(this ObjRef rhinoRef) => ApertureEntity.TryGetFrom(rhinoRef.Geometry());
public static bool IsAperture(this GeometryBase geometry) => ApertureEntity.TryGetFrom(geometry).IsValid;