If you open the IFC file with XBimExplorer (compiling the master branch) you will notice that the walls are not being displayed:
I doubt this is the proper solution, but it might give a hint as to what might be wrong.
But if the code changes listed are applied, then the walls do display:
Btw, XbimXplorer version 4 does display the walls. So this is some sort of regression.
Let me know how to proceed. If this should be the proper solution, I can make a pull request, otherwise please give me some hints as to where the problem might be. I spent a lot of time, trying to figure this out, so any help/advice is appreciated.
This is in XbimGeometryCreator.cpp. Just added code to support XBimSolidSets.
void XbimGeometryCreator::WriteTriangulation(BinaryWriter^ bw, IXbimGeometryObject^ shape, double tolerance, double deflection, double angle)
{
XbimOccShape^ xShape = dynamic_cast<XbimOccShape^>(shape);
if (xShape != nullptr)
{
xShape->WriteTriangulation(bw, tolerance, deflection, angle);
return;
}
/// START
/// NEW CODE -> workaround for the problem of the walls not being displayed
XbimSolidSet^ xSolidSet = dynamic_cast<XbimSolidSet^>(shape);
if (xSolidSet != nullptr)
{
// create an XBimCompound out of the XBimSolidSet
TopoDS_Compound compound;
BRep_Builder b;
b.MakeCompound(compound);
for each (IXbimSolid^ solid in xSolidSet)
{
if (!solid->IsValid)
{
continue;
}
XbimSolid^ solid2 = dynamic_cast<XbimSolid^>(solid);
if (solid2 != nullptr) {
b.Add(compound, solid2);
//GC::KeepAlive(solid);
XbimCompound^ compound2 = gcnew XbimCompound(compound, true, tolerance);
compound2->WriteTriangulation(bw, tolerance, deflection, angle);
}
}
}
/// END
/// NEW CODE
}
If you open the IFC file with XBimExplorer (compiling the master branch) you will notice that the walls are not being displayed:
I doubt this is the proper solution, but it might give a hint as to what might be wrong. But if the code changes listed are applied, then the walls do display:
Btw, XbimXplorer version 4 does display the walls. So this is some sort of regression.
Let me know how to proceed. If this should be the proper solution, I can make a pull request, otherwise please give me some hints as to where the problem might be. I spent a lot of time, trying to figure this out, so any help/advice is appreciated.
This is in XbimGeometryCreator.cpp. Just added code to support XBimSolidSets.
Thank you! xBim-Issue.zip