GithubHelp home page GithubHelp logo

Context Creation Failing about xbimgeometry HOT 14 CLOSED

xbimteam avatar xbimteam commented on September 28, 2024 1
Context Creation Failing

from xbimgeometry.

Comments (14)

urosjovanovic avatar urosjovanovic commented on September 28, 2024

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.

from xbimgeometry.

ravigarg1 avatar ravigarg1 commented on September 28, 2024

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.

from xbimgeometry.

urosjovanovic avatar urosjovanovic commented on September 28, 2024

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

from xbimgeometry.

CBenghi avatar CBenghi commented on September 28, 2024

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

from xbimgeometry.

theextremeandy avatar theextremeandy commented on September 28, 2024

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 )<---

from xbimgeometry.

CBenghi avatar CBenghi commented on September 28, 2024

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

from xbimgeometry.

theextremeandy avatar theextremeandy commented on September 28, 2024

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

from xbimgeometry.

CBenghi avatar CBenghi commented on September 28, 2024

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

from xbimgeometry.

theextremeandy avatar theextremeandy commented on September 28, 2024

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

from xbimgeometry.

CBenghi avatar CBenghi commented on September 28, 2024

from xbimgeometry.

theextremeandy avatar theextremeandy commented on September 28, 2024

from xbimgeometry.

theextremeandy avatar theextremeandy commented on September 28, 2024

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

from xbimgeometry.

CBenghi avatar CBenghi commented on September 28, 2024

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

from xbimgeometry.

SteveLockley avatar SteveLockley commented on September 28, 2024

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

from xbimgeometry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.