XbimGeometry
XbimGeometry copied to clipboard
Regression bug on SurfaceCurveSweptAreaSolid Creation
Hi XBim Team!
When I try to load this model 731487_(EDITED).zip in XBim Xplorer I get the errors below:
In Solibri it's look like this:
I tried the last version of the Geometry library available on xbim_master repo
Any ideas?
Thanks Again!
Can you try with latest develop instead? I have a somewhat "in-between-master-and-develop" version and the file imports correctly for me.
/Mikael
Thanks for your quick reply! :) I tried with the last version on xbim-develop and I got another error:
Hi Mikael,
I tried to load the file with the lastest version of the xbim_master 5.1.427 version and I got the same errors. Do you have an idea?
If it can help, I found that it's a regression bug
On my watch, this happened on multi-thread processing of large ifc file, if use single thread, it is ok. But If still want to do multi-thread proccessing, please have a try to add "GC::KeepAlive(sweep);" in void XbimSolid::Init(IIfcSweptDiskSolid^ repItem, ILogger^ logger)
String^ err = BuildSweptDiskSolid(sweep, repItem->Radius, repItem->InnerRadius.HasValue ? (double)repItem->InnerRadius.Value : -1., transitionMode);
GC::KeepAlive(sweep);
GC::KeepAlive(sweep) will not allow garbage collection to cycle sweep (directrix) before c++ processing return.
I not sure if this is the final or perfect solution, just pop this up for reference.
Below picture is the result in my app with changes on exception handling (std::exception -> Standard_Failure, normal validation) from develop branch:
Actually there is another Regression about the https://github.com/xBimTeam/XbimWindowsUI/blob/master/XbimXplorer/BIM%20Logo.ifc,
It is processed as this:
The 'M' is missed
The reason is here:
gp_Ax3 toAx3(p1, tangent, norm); //Zdir pointing tangentally to sweep, XDir perpendicular to the ref surfac
gp_Ax3 fromAx3(gp::Origin(), faceStartZDir, faceStartXDir);
gp_Trsf trsf;
trsf.SetTransformation(toAx3, fromAx3);
TopLoc_Location topLoc(trsf);
faceStartOcc.Move(topLoc);
In xbim4, the fromAx3 is just default gp_Ax3(), to display this ifc correctly with new code, have to change the clockwise order of Area profile to counter clockwise.