Hi,
I got this "Expected value to be greater than or equal to 1"
when trying to generate a GLTF from an IFC file I have.
I think this element is corrupted since Revit (and other IFC viewers) cannot load this element.
I debugged it and saw that it happens when it one of the elements XbimShapeInstances has an empty bounding box.
Would you consider to add a filtering condition in 'GetShapeInstancesToRender' in the Builder class to avoid this crash (since we anyway can't get the GLTF for this shape) or will it lead to other problems?
private static IEnumerable<XbimShapeInstance> GetShapeInstancesToRender(IGeometryStoreReader geomReader, HashSet<short> excludedTypes, HashSet<int> EntityLebels = null)
{
if (EntityLebels == null)
{
var shapeInstances = geomReader.ShapeInstances
.Where(s =>
s.RepresentationType == XbimGeometryRepresentationType.OpeningsAndAdditionsIncluded
&&
!excludedTypes.Contains(s.IfcTypeId));
return shapeInstances;
}
var entityFilter = geomReader.ShapeInstances
.Where(s =>
s.RepresentationType == XbimGeometryRepresentationType.OpeningsAndAdditionsIncluded
&&
!excludedTypes.Contains(s.IfcTypeId)
&&
EntityLebels.Contains(s.IfcProductLabel)
&& (s.BoundingBox.IsEmpty == false) // <====== Maybe this check is required to filter corrupted shapes?
);
return entityFilter;
}
}
Hi,
I got this "Expected value to be greater than or equal to 1"
when trying to generate a GLTF from an IFC file I have.
I think this element is corrupted since Revit (and other IFC viewers) cannot load this element.
I debugged it and saw that it happens when it one of the elements XbimShapeInstances has an empty bounding box.
Would you consider to add a filtering condition in 'GetShapeInstancesToRender' in the Builder class to avoid this crash (since we anyway can't get the GLTF for this shape) or will it lead to other problems?