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

Context Creation Failing #38

Closed
urosjovanovic opened this issue Feb 24, 2017 · 14 comments
Closed

Context Creation Failing #38

urosjovanovic opened this issue Feb 24, 2017 · 14 comments
Assignees
Labels
feature A new feature or enhancement

Comments

@urosjovanovic
Copy link

Greetings team,

I'm having difficulties opening the submitted IFC file. Xbim is failing at geometry context creation. Tried with newest Xbim Windows UI version (master and develop).

Any help appreciated.
Best regards,
Uros

image

140056.zip

@urosjovanovic
Copy link
Author

urosjovanovic commented Feb 27, 2017

I took a closer look into it, it seems like there is no IfcGeometricRepresentationContext in file. Manually adding the entries solved the issue. In order to get product models to actually show in viewer, their representations must be linked to added context.

Is there a possibility that context-less files default to 3D model context? The file opens fine in Revit, Navis and Solibri.

@ravigarg1
Copy link

Hi, If it is leading you to Create Context related error, you can try to convert the file on 64 bit machine. We have faced this issue couple of times on a 32 bit Machine.

@urosjovanovic
Copy link
Author

This was tested on 64 bit machine. Not really sure what do you mean by "converting" the file?

@CBenghi CBenghi added the feature A new feature or enhancement label Apr 21, 2017
@CBenghi
Copy link
Member

CBenghi commented Apr 21, 2017

Your proposal sounds interesting, I'll see if it makes sense talking to @SteveLockley.

@theextremeandy
Copy link

Hi, I have a similar error into XBIM.Exchange program.cs at line context.CreateContext();
Have you any idea?
tnks
andrea
This is the complete exception:
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Xbim.ModelGeometry.Scene.Xbim3DModelContext.WriteProductShape(XbimCreateContextHelper contextHelper, IIfcProduct element, Boolean includesOpenings, IGeometryStoreInitialiser txn) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 980
at Xbim.ModelGeometry.Scene.Xbim3DModelContext.<>c__DisplayClass13.b__f(IGrouping2 pair) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 740 at System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at 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) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body) at Xbim.ModelGeometry.Scene.Xbim3DModelContext.WriteFeatureElements(XbimCreateContextHelper contextHelper, ReportProgressDelegate progDelegate, XbimGeometryType geomType, IGeometryStoreInitialiser txn) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 782 at Xbim.ModelGeometry.Scene.Xbim3DModelContext.CreateContext(ReportProgressDelegate progDelegate, Boolean adjustWcs) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 681 at Xbim.Exchange.Program.Main(String[] args) in C:\Users\Administrator\Downloads\XbimExchange-master\XbimExchange-master\Xbim.Exchange\Program.cs:line 48 ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at Xbim.ModelGeometry.Scene.Xbim3DModelContext.WriteProductShape(XbimCreateContextHelper contextHelper, IIfcProduct element, Boolean includesOpenings, IGeometryStoreInitialiser txn) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 980 at Xbim.ModelGeometry.Scene.Xbim3DModelContext.<>c__DisplayClass13.<WriteFeatureElements>b__f(IGrouping2 pair) in c:\BuildAgent\work\860c3b913b6c647f\Xbim.ModelGeometry.Scene\Xbim3DModelContext.cs:line 740
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<---

@CBenghi CBenghi self-assigned this Dec 12, 2017
@CBenghi
Copy link
Member

CBenghi commented Dec 16, 2017

Hello @theextremeandy,
can you share (in private if needed) the offending file?
Claudio

@theextremeandy
Copy link

Hello @CBenghi
yes I can. i sent the ifc file to your email
tnks ;-)

@CBenghi
Copy link
Member

CBenghi commented Dec 18, 2017

@theextremeandy
Your file seems to open without issues in the latest develop branch...
Is that the one you are using?
image

@theextremeandy
Copy link

good new!
but my error occurs in phase of conversion from IFC to wexBim

@CBenghi
Copy link
Member

CBenghi commented Dec 19, 2017 via email

@theextremeandy
Copy link

theextremeandy commented Dec 20, 2017 via email

@theextremeandy
Copy link

another problem is below
steps:
download XbimWindowsUI
open project with VS2017
build ok
add packages sources Develop and Master to NuGet pakage manager setting
build ok
update log4net
build ok
update json
build ok
update essentials
build with errors in attached image
screen shot 12-20-17 at 10 53 am
the second one I think is simple resolve without the last parameter
but we can't resolve this:
pe.Activate(false);
can you help me
tnks

@CBenghi
Copy link
Member

CBenghi commented Dec 20, 2017

I see from the screenshot that you are not under a git repo ("add to source control")....
Can you try again through git and checking out develop branch?
I think your problem is there.
Claudio

@SteveLockley
Copy link
Member

Files that contain no geometric representation context are possible but violate the Ifc schema. The context gives information on precision and coordinate systems. If precision is not correctly specified boolean operations can often fail. It is better to have a valid ifc file rather than default to some "typical" precision.
I am closing this issue as the failure to create a context is resolved in the latest versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or enhancement
Projects
None yet
Development

No branches or pull requests

5 participants