Faulty display of IfcBooleanClippingResult

I'm currently working on an IfcViewer application using Xbim, and HelixToolkit. So far i've had no problem with the display if IFC files, and objects. Recently I've introduced objects where the geometry comes from an IfcBooleanClippingResult. The 2 objects used as first, and second operands are both IfcExtrudedAreaSolids.

The problem is that in my viewer The result seems like I set

intersection.Operator = IfcBooleanOperator.DIFFERENCE;

no matter what. In other viewers, such as BIMVision, or XbimXplorer the result, and thus the IFC file I generate seems to be OK.

Here's the creating of the IFCBooleanClippingResult:

IfcBooleanClippingResult intersection = model.Instances.New<IfcBooleanClippingResult>();

intersection.Operator = IfcBooleanOperator.INTERSECTION;
intersection.SecondOperand = compositeIntersection.Body2.Geometry;
intersection.FirstOperand = compositeIntersection.Body1.Geometry;

So these are the 2 bodies I want to calculate intersection on:

this is the result if this code:

shapeRepresentation.Items.Add(compositeIntersection.Body2.Geometry);
shapeRepresentation.Items.Add(compositeIntersection.Body1.Geometry);

the 2 bodies together

if I switch to this:

shapeRepresentation.Items.Add(intersection);

I see:

difference result instead of intersection

however opening the same file in BIMVision, I see expected results:

correct intersection here

No matter if I set:

IfcBooleanOperator.UNION; or IfcBooleanOperator.DIFFERENCE; or IfcBooleanOperator.INTERSECTION;

I see the same DIFFERENCE result in my viewer, but I see correct result in other viewers.

Do you have any idea, where I start looking at? I know the problem must be somewhere in my code, but I don't know wheter it is some configuration if Xbim, or Helix, or both, or maybe somewhere else? My viewer interprets these clipping results clearly false. I can give more detailed information, or code, if needed.

here is the generated IFC file.

Upvotes: 1

Views: 37

Answers (0)

Related Questions