XbimGeometry icon indicating copy to clipboard operation
XbimGeometry copied to clipboard

Regression bug on SurfaceCurveSweptAreaSolid Creation

Open Sim3d opened this issue 3 years ago • 6 comments

Hi XBim Team!

When I try to load this model 731487_(EDITED).zip in XBim Xplorer I get the errors below:

XbimXplorer_SMeuVdS5M8

In Solibri it's look like this:

Solibri_Model_Viewer_v9 8_RsdfKwe353

I tried the last version of the Geometry library available on xbim_master repo

Assemblies

Any ideas?

Thanks Again!

Sim3d avatar May 12 '21 16:05 Sim3d

Can you try with latest develop instead? I have a somewhat "in-between-master-and-develop" version and the file imports correctly for me. Import_01

/Mikael

jomijomi avatar May 13 '21 10:05 jomijomi

Thanks for your quick reply! :) I tried with the last version on xbim-develop and I got another error:

image

image

Sim3d avatar May 13 '21 17:05 Sim3d

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?

7KWYiyQiaO

Sim3d avatar Jun 03 '21 15:06 Sim3d

If it can help, I found that it's a regression bug

image

Sim3d avatar Jun 03 '21 16:06 Sim3d

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:

image

crazyrainman avatar Jun 18 '21 07:06 crazyrainman

Actually there is another Regression about the https://github.com/xBimTeam/XbimWindowsUI/blob/master/XbimXplorer/BIM%20Logo.ifc,

It is processed as this:

image

The 'M' is missed

image

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.

image

crazyrainman avatar Jun 19 '21 00:06 crazyrainman