xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
485 stars 172 forks source link

Generating Geometry for IfcPrducts one by one #511

Open GVladislavG opened 1 year ago

GVladislavG commented 1 year ago

Hello, xBim team!

I'm getting geometry for a model using this code

m_3DMdlContext = new Xbim3DModelContext(m_model);
m_3DMdlContext.MaxThreads = 1;
m_3DMdlContext.CreateContext();
m_ShapeInsts = m_3DMdlContext.ShapeInstances().ToList();

This way generates ShapeInstances for whole model, all IfcProducts at once. And somtimes it makes xBim crash by StackOverflow or MemoryOverflow. So is there any way to generate geometry for IfcProducts one by one, not for whole model at once?

Please take a look at https://github.com/xBimTeam/XbimGeometry/issues/431

Thanks!

martin1cerny commented 1 year ago

Yes, but you will need to dive deeper in the geometry engine.

GVladislavG commented 1 year ago

Can you give some code sample please? And is there any news about new version of xBim, where some problems with geometry generation are fixed?

martin1cerny commented 1 year ago

We are still working hard on the new geometry engine release. Search in geometry engine repository issues for code examples please. This question has been asked several times in there.