(not) empty IFC model
Hi all,
I'm writing regarding the attached file. In all other BIM viewer I see a beam, with XbimExplorer (and Xbim libraries in general) I see nothing. I get the error:
ERROR Xbim.Geometry.XbimGeometryCreator EE001: Failed to create geometry #33 of type IfcExtrudedAreaSolid, General Error Creating IfcExtrudedAreaSolid, #33
The file was generated with XbimEssential v4, IFC2x3 format.
Can anyone tell what's wrong in reading the model with Xbim? I suspect Xbim wants some additional informations (IFCProducts?) that other readers can bypass. wex.zip
This seems to be independent of the file, I believe this is a bug, since in XbimGeometry-master\Xbim.Geometry.Engine.Interop\XbimGeometryEngine.cs there's a call to Create like this:
public IXbimGeometryObject Create(IIfcGeometricRepresentationItem ifcRepresentation) { return Create(ifcRepresentation, null); }
Calling IXbimGeometryObject Create(IIfcGeometricRepresentationItem ifcRepresentation, IIfcAxis2Placement3D objectLocation) when objectLocation is null will cause a AccessViolationException.
This is strange, since reading the code in C++ of IXbimGeometryObject^ XbimGeometryCreator::Create in XbimGeometry, it seems that null is safely managed.
This is fixed in the v5.0 XbimGeometry. Close this off when we integrate the latest dependencies
Hello, thanks for your reply. Before to release Xbim Xplorer 5.1, I want to draw your attention on another similar bug. I tried with the current code contained in XbimWindowsUI repo.
When loading the attached model (that comes from a famous structural analysis software) nothing is displayed. I get the error:
==== 11:04 3 Error XbimXplorer.XplorerMainWindow Error creating geometry context of "C:\Users\Giovanni\Desktop\modelliGEN\pilastri.ifc" Error creating geometry context of 'C:\Users\Giovanni\Desktop\modelliGEN\pilastri.ifc' in System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) in System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) in System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
in System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
in System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body)
in Xbim.ModelGeometry.Scene.Xbim3DModelContext.WriteProductShapes(XbimCreateContextHelper contextHelper, IEnumerable1 products, IGeometryStoreInitialiser txn) in Xbim.ModelGeometry.Scene.Xbim3DModelContext.CreateContext(ReportProgressDelegate progDelegate, Boolean adjustWcs) in XbimXplorer.XplorerMainWindow.OpenAcceptableExtension(Object s, DoWorkEventArgs args).
I suppose there are other bugs, because the attached file comes from a very spread program (and even if there could be IFC syntax errors, something must be displayed...) in IFC2x3 format.
thanks in advance for help pilastri.zip
The IFC isn't IFC2x3 compliant (as the embedded validation states):
Entity #17 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #31 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #45 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #59 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #66 (IfcRelAssociatesMaterial) has validation failures. IfcRelAssociatesMaterial.RelatingMaterial is not optional. Entity #67 (IfcRelAssociatesMaterial) has validation failures. IfcRelAssociatesMaterial.RelatingMaterial is not optional. Entity #75 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #109 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #130 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #151 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #185 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #210 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #235 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #256 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21. Entity #283 (IfcWallStandardCase) has validation failures. Issue of type EntityWhereClauses on IfcWallStandardCase.WR1. Entity #290 (IfcShapeRepresentation) has validation failures. IfcShapeRepresentation.ContextOfItems is not optional. Issue of type EntityWhereClauses on IfcShapeRepresentation.WR21.
It's more a question of being more failure tolerant to frequent IFC schema implementation issues.
See also (http://www.buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcrepresentationresource/lexical/ifcshaperepresentation.htm)
Yes, the hidden suggestion in my post is definitely to be more tolerant - all other readers I tried work fine. Is that possible? Otherwise, IMHO this would be a limitation of xBIM libraries.