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
260 stars 131 forks source link

Federation in wexbim #408

Open kovacevski opened 1 year ago

kovacevski commented 1 year ago

Hi, I have 3 wexbim files generated with

using (var wexBiMfile = File.Create(wexBimFilename))
{
    using (var wexBimBinaryWriter = new BinaryWriter(wexBiMfile))
    {
        model.SaveAsWexBim(wexBimBinaryWriter);
        wexBimBinaryWriter.Close();
    }
    wexBiMfile.Close();
}

Two of them are in meters, and one is in millimeters. In the browser I can see and manipulate (zoom in/out, pan, etc) simultaneously only the ones that are in meters, but I cannot see the third one (or it is very small that I cannot see it). Is it possible to have the right federation when the IFC files are not in the same units?

sample.zip

martin1cerny commented 1 year ago

Hi @kovacevski ,

we respect the original units through the process, so when you combine the two models, they will not federate as you have noticed. This is intentional, because when you take measures from the 3D UI and you want to combine it with the data from the model, it wouldn't work together.

You can apply the scale either in the process of wexbim creation, or in the viewer on the fly. We have chosen the first option in our Flex platform, where we normalize all wexbim files to meters (using different code to transform BRep into wexBIM). But as I said, we then need to be very careful whenever we combine the data from the model (say level height) with the 3D presentation.

All contributions are welcome, it would be a sensible optional argument for model.SaveAsWexBim().