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
255 stars 128 forks source link

Setting model units #472

Open GVladislavG opened 5 months ago

GVladislavG commented 5 months ago

Hello, XBim team!

How can I set model units? It's millimeters by default. How to set meters for example?

Thanks!

andyward commented 5 months ago

Assuming you mean the Project units? Have you seen how it's implemented here?:

https://github.com/xBimTeam/XbimEssentials/blob/4ed33f7a0427ea91bc7825810c381779ecf5053c/Xbim.Ifc4/Kernel/IfcProjectPartial.cs#L48

If you want Meters rather than Millimeters, you presumably just want to remove the IfcSIPrefix.MILLI prefix during project setup.

GVladislavG commented 5 months ago

Thanks! I set meters as units for Project. But now there is problem with showing model in viewers. I scaled all coordinates to meters while creating IFC-file. Test.zip

martin1cerny commented 4 months ago

You will need to be much more specific about the issues. In general, these would be data related issues, not Toolkit or IFC issues.