xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
260 stars 132 forks source link

General Error Creating IFCBooleanClippingResult in GeometryEngine v5.1.0.346 #274

Closed zohelfer closed 3 years ago

zohelfer commented 4 years ago

Opening the attached file in Xplorer after upgrading the GeometryEngine to version 5.1.0.346 now throws a general error when trying to create IFCBooleanClippingResult 125241. This file used to successfully open in version 5.1.0.317.

Assemblies and versions affected:

image

Steps (or code) to reproduce the issue:

Open attached file in newest Xplorer release.

Minimal file to reproduce the issue:

ACA-IFC-17.zip

Expected behavior:

File opens and geometry is displayed

Actual behavior or exception details:

image image

andyward commented 4 years ago

In GE 5.1.371 we're getting the same error:

Processing failure
General Error Creating IfcBooleanClippingResult, #125241
   at Xbim.Geometry.XbimGeometryCreator.Create(IIfcGeometricRepresentationItem geomRep, IIfcAxis2Placement3D objectLocation, ILogger logger)
   at Xbim.Geometry.Engine.Interop.XbimGeometryEngine.Create(IIfcGeometricRepresentationItem ifcRepresentation, ILogger logger)
   at Xbim.ModelGeometry.Scene.Xbim3DModelContext.<>c__DisplayClass39_0.<WriteShapeGeometries>b__0(Int32 shapeId)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
oleomachado commented 3 years ago

Any news about this issue?

I tested the same model and another private one with the most recent version (Geometry 5.1.403) and the problem still exists.

info: Xbim.ModelGeometry.Scene.Xbim3DModelContext[0]
      GeomEngine: #823623=IfcArbitraryClosedProfileDef [Profile could not be built.It has been omitted]
fail: Xbim.ModelGeometry.Scene.Xbim3DModelContext[0]
      Processing failure
      System.Exception: General Error Creating IfcExtrudedAreaSolid, #823633
         at Xbim.Geometry.XbimGeometryCreator.Create(IIfcGeometricRepresentationItem geomRep, IIfcAxis2Placement3D objectLocation, ILogger logger)
         at Xbim.Geometry.Engine.Interop.XbimGeometryEngine.Create(IIfcGeometricRepresentationItem ifcRepresentation, ILogger logger) in C:\buildagent_os\_work\1\s\Xbim.Geometry.Engine.Interop\XbimGeometryEngine.cs:line 74
         at Xbim.ModelGeometry.Scene.Xbim3DModelContext.<>c__DisplayClass39_0.<WriteShapeGeometries>b__0(Int32 shapeId) in C:\buildagent_os\_work\1\s\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 1373
         at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
         at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
ERROR: Processing halted due to model error
info: BimViewerIfcFrameworkOriginal.Handlers.XbimIfcTranslationHandler[0]
      File Translation Error Processing halted due to model error

I did the same tests with Geometry 5.1.317 (and Xbim IFC 5.1.289) and it can finish successfully.

Thanks

bekraft commented 3 years ago

I've taken a look. First, there's a little bit strange unit assignment from millimeter to inch (25,4mm). It causes some odd tolerance values but which are correctly calculated. The critical instances is

#125238=IFCEXTRUDEDAREASOLID(#125200,#125237,#125198,63.95);

where the base face is a composite curve in XY plane. The creation of a face fails during the incremental precision algorithm at XbimFace which tries to find a supporting face. Surprisingly (or not), it succeeds with default (-1) tolerance.

When setting to -1 the strange result is very the same as the one of BimVision (see below). Maybe, we can omit the try-and-fail plane finding algorithm at all and use the default tolerance (whatever it is, I haven't found any hint)?

Screenshot 2021-01-08 161704 Screenshot 2021-01-08 161752

zohelfer commented 3 years ago

It looks like the recent changes made in v5.1.422-develop have resolved this issue allowing for the job to be imported again. image

Thank you so much everyone!