Comments (14)
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.
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.
This was tested on 64 bit machine. Not really sure what do you mean by "converting" the file?
from xbimgeometry.
Your proposal sounds interesting, I'll see if it makes sense talking to @SteveLockley.
from xbimgeometry.
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_0
1.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, Action
2 bodyWithState, Func4 bodyWithLocal, Func
1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable
1 source, ParallelOptions parallelOptions, Action1 body, Action
2 bodyWithState, Action3 bodyWithStateAndIndex, Func
4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func
1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable
1 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(IGrouping
2 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.
Hello @theextremeandy,
can you share (in private if needed) the offending file?
Claudio
from xbimgeometry.
Hello @CBenghi
yes I can. i sent the ifc file to your email
tnks ;-)
from xbimgeometry.
@theextremeandy
Your file seems to open without issues in the latest develop branch...
Is that the one you are using?
from xbimgeometry.
good new!
but my error occurs in phase of conversion from IFC to wexBim
from xbimgeometry.
from xbimgeometry.
from xbimgeometry.
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
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.
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.
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)
- Resolving native assemblies from UNC file share fails under NetFramework
- Some IXbimSolid elements don't exist when performing boolean operations HOT 4
- How to get color of IfcSpace? HOT 3
- net6.0 support HOT 5
- Cant create valid IfcSurfaceCurveSweptAreaSolid HOT 1
- Getting correct position of the model in world coordinates
- How to set up local development environment to fix bug's and create PR to contribute in xbim repositories. HOT 1
- How to get outer Edges for an IfcEntity using Xbim library ? HOT 8
- Load Ifc File System.AccessViolationException HOT 4
- Big size of result IFC file HOT 3
- XbimShapeInstance.Transformation places instance in world coordinates HOT 1
- Setting model units HOT 3
- Is v6 geometry engine currently much slower than v5?? HOT 2
- System.OutOfMemoryException. Array dimensions exceeded supported range. HOT 5
- GetShellPoints of a component HOT 1
- Failed to load IFC file: failed to load Xbim.Geometry.Engine64.dll HOT 8
- We need to get plot line bounding box distance for all levels. HOT 1
- We need to get shellpoints of any Building elements. HOT 1
- How to get face points of any building element. HOT 1
- ShapeUpgrade_UnifySameDomain causes a freeze HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xbimgeometry.