xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
249 stars 126 forks source link

WexBim viewer is not showing the geometry correctly #487

Open kovacevski opened 2 weeks ago

kovacevski commented 2 weeks ago

Hello,

I have IFC file exported from Archicad. When open in BimVision, the model looks good, but when open in the wexbimviewer it somehow cut the geometries. I am just simply saving the file using:

            using (var model = IfcStore.Open(fileName))
            {
                var context = new Xbim3DModelContext(model);
                context.CreateContext();

                var wexBimFilename = Path.ChangeExtension(fileName, "wexBIM");
                using (var wexBiMfile = File.Create(wexBimFilename))
                {
                    using (var wexBimBinaryWriter = new BinaryWriter(wexBiMfile))
                    {
                        model.SaveAsWexBim(wexBimBinaryWriter);
                        wexBimBinaryWriter.Close();
                    }
                    wexBiMfile.Close();
                }
            }

Thank you. SimpleShed.zip bimvision wexbim

andyward commented 2 weeks ago

Which versions of Geometry and wexbim UI are you using?

Can you show the code you use to generate geometry? Have you tried using the adjustWcs param on Xbim3DModelContext.CreateContext() - from the image it looks like the kind of floating point precision issue you get when using large offset coordinates.

kovacevski commented 2 weeks ago

Hi Andy,

Exactly, the problem occurs only when I have large offset. I haven't tried adjustWcs, I will try and let you know.

Thank you.

kovacevski commented 2 weeks ago

Also, some of the walls are not showing on this file. image (36) TestModel.zip

I am using XBimGeometry 5.1.437 and @xbim/viewer 2.1.0-pre202403281736

kovacevski commented 1 week ago

Hello,

Any clue why the walls with openings are not showing in wexbim viewer?