Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCascade Exception when Creating Grids #135

Closed
kikootwo opened this issue Jul 12, 2018 · 4 comments
Closed

OpenCascade Exception when Creating Grids #135

kikootwo opened this issue Jul 12, 2018 · 4 comments
Labels
bug Confirmed bug - system not working as intended
Milestone

Comments

@kikootwo
Copy link

Hello,

If you have instantiated an IFCGRID type, and have not defined these lines:

#43= IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);
#44= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.3048),#42);
#45= IFCCONVERSIONBASEDUNIT(#43,.LENGTHUNIT.,'FOOT',#44);

XbimXplorer will throw this exception
image

To recreate this bug, remove your reference to IFCCONVERSIONBASEDUNIT from unit assignment in any file with an IFCGRID. Please let me know if you need any additional information.

EDIT: Forgot to mention, the grid must have at least one grid axis.

@martin-loucka
Copy link

martin-loucka commented Jul 15, 2018

yes the same issue...

at BRepOffsetAPI_MakePipe.{ctor}(BRepOffsetAPI_MakePipe* , TopoDS_Wire* , TopoDS_Shape* )
at Xbim.Geometry.XbimGeometryCreator.CreateGrid(IIfcGrid grid)
at Xbim.ModelGeometry.Scene.Xbim3DModelContext.WriteShapeGeometries(XbimCreateContextHelper contextHelper, ReportProgressDelegate progDelegate, IGeometryStoreInitialiser geometryStore, XbimGeometryType geomStorageType) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 1136
at Xbim.ModelGeometry.Scene.Xbim3DModelContext.CreateContext(ReportProgressDelegate progDelegate, Boolean adjustWcs) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 676
at UnitTests.xBim.Readers.GeoReader.ReadGeo(String ifcFileName) in C:\01_Work\06_Senn\01_Code\99_Tests_UnitTests\xBim\Readers.cs:line 89

@andyward andyward transferred this issue from xBimTeam/XbimWindowsUI Nov 9, 2018
@andyward andyward added the bug Confirmed bug - system not working as intended label Nov 9, 2018
@andyward andyward added this to the Backlog milestone Nov 9, 2018
@andyward andyward modified the milestones: Backlog, 5.0.0 Nov 23, 2018
@andyward
Copy link
Member

andyward commented Dec 7, 2018

Do we have a test file to confirm this fix?

@SteveLockley
Copy link
Member

kikootwo can you provide a file for this please. Just removing the Conversion based unit line seems odd, why do you want to do this? I suspect if you do so the units and the model precision will mismatch. i.e. The model will default to millimeters and everything will be approx 3 times smaller but you precision will still be the same.

@AllanCrow
Copy link

I am having the exact same issue with an IFC file. It loads with errors and warnings in Explorer but when in debug mode it crashes. The error is System.StackOverflowException

` var model = IfcStore.Open(dlgFileName);
if (model.GeometryStore.IsEmpty)
{
// Create the geometry using the XBIM GeometryEngine
try
{
var context = new Xbim3DModelContext(model);

                context.CreateContext(); //Crashes here <----------------------`

I have tried in XbimXplorer & Xbim.Presentation the following packages
Xbim.Geometry (5.1.430) & (5.1.403)
Xbim.Geometry.Engine.Interop (5.1.403) & (5.1.403)

I can share the IFC file if need be.

I have searched the Internet up and down and cannot find a solution!!!!

Please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug - system not working as intended
Projects
None yet
Development

No branches or pull requests

5 participants