diff --git a/Revit_Core_Engine/Query/PanelPlanes.cs b/Revit_Core_Engine/Query/PanelPlanes.cs index 5e526491a..24e8f0b23 100644 --- a/Revit_Core_Engine/Query/PanelPlanes.cs +++ b/Revit_Core_Engine/Query/PanelPlanes.cs @@ -77,7 +77,6 @@ public static List PanelPlanes(this Floor floor, RevitSettings settings) List result = new List(); foreach (Reference reference in HostObjectUtils.GetTopFaces(floor)) { - PlanarFace pf = floor.GetGeometryObjectFromReference(reference) as PlanarFace; if (pf != null) { @@ -85,6 +84,8 @@ public static List PanelPlanes(this Floor floor, RevitSettings settings) if (result.All(x => !x.IsSimilar(plane, settings, true))) result.Add(plane); } + else + BH.Engine.Base.Compute.RecordWarning($"Some top faces of the floor are not planar, therefore they could not be queried. ElementId: {floor.Id.IntegerValue}"); } return result; @@ -110,6 +111,8 @@ public static List PanelPlanes(this RoofBase roof, RevitSettings settings if (result.All(x => !x.IsSimilar(plane, settings, true))) result.Add(plane); } + else + BH.Engine.Base.Compute.RecordWarning($"Some top faces of the roof are not planar, therefore they could not be queried. ElementId: {roof.Id.IntegerValue}"); } return result; @@ -135,6 +138,8 @@ public static List PanelPlanes(this Ceiling ceiling, RevitSettings settin if (result.All(x => !x.IsSimilar(plane, settings, true))) result.Add(plane); } + else + BH.Engine.Base.Compute.RecordWarning($"Some top faces of the ceiling are not planar, therefore they could not be queried. ElementId: {ceiling.Id.IntegerValue}"); } return result;