xBimTeam / XbimWindowsUI

The home of XbimXplorer and WPF components for your desktop BIM applications.
Other
248 stars 149 forks source link

Uncorrect solid manipulation #83

Closed ghost closed 6 years ago

ghost commented 6 years ago

Expected behavior:

Hello, I'm tryng to open a IFC file with XBim.

The result that I expect is: imgstair

but when I open this IFC file the result is: imgstair2

In XbimXplorer I have the same issue with a compiled version of the solution on my machine: imgstair3

But if I use a compiled version from installable distribution the file is read correctly: imgstair4

To read the geometry shapes in the file i use this code:

Minimal code (or steps) to reproduce the issue:

public static void TransformFromProduct(IIfcProduct product, IfcStore model)
   var shape = ctx.ShapeInstancesOf(product);
   var productShape = shape.Where(s => s.RepresentationType != XbimGeometryRepresentationType.OpeningsAndAdditionsExcluded).ToList();
   foreach (XbimShapeInstance shapeInstance in productShape)
   {
       XbimShapeGeometry geometry = ctx.ShapeGeometry(shapeInstance.ShapeGeometryLabel);
       MemoryStream ms = new MemoryStream(((IXbimShapeGeometryData)geometry).ShapeData);
       BinaryReader br = new BinaryReader(ms);
       XbimShapeTriangulation mesh = br.ReadShapeTriangulation();
       mesh = mesh.Transform(shapeInstance.Transformation);
       ...
    }
}

It seems that the solid boolean operation works in inverse way, but it's only a empiric observation.

Versions of xBIM Packages:

Minimal file to reproduce the issue:

scala_travi.zip

CBenghi commented 6 years ago

If you get the develop branch you'll probably find that geometry is going to be ok. Read the "Compilation" section in http://docs.xbim.net/index.html if you want to get the develop nuget distribution with the beta pre-release flag enabled.

ghost commented 6 years ago

Yes, with developer branche version of dll works fine! Thanks!

WindingWinter commented 6 years ago

@svblu , just curious, for the first screenshot you show, what software you are using?

ghost commented 6 years ago

@WindingWinter it's BIM Vision a free IFC Viewer.