一个用于处理 IFC 格式数据的 .NET 库。这是 Xbim 工具包的核心组件
| Branch | Build Status | MyGet | NuGet |
|---|---|---|---|
| Master | |||
| Develop | - |
| Toolkit Component | Latest Myget (develop) | Latest Myget (master) | Latest Nuget |
|---|---|---|---|
| Essentials | |||
| Geometry | |||
| CobieExpress | |||
| Windows UI |
XbimEssentials is the foundational components of Xbim, the eXtensible Building Information Modelling toolkit for the .NET platform. This library enables software developers to easily read, write, validate and interrogate data in the buildingSmart IFC formats, using any .NET language.
As of version 6.1 XbimEssentials includes support for .netstandard2.0, .netstandard2.1, .net8 and net10.
Supporting netstandard2.0 provides support .NET Framework 4.7.2 upwards.
Earlier .NET Framework versions may work, but we can't provide any support for them.
IFC is an ISO Standard and platform-neutral open file format for data exchange of building information. This library supports STEP, IfcXml and IfcZip formats, and enables you to read and write the full schema of IFC2x3 and IFC4 (including support for the latest Ifc4 Addendum 2).
The wider XBIM toolkit contains additional repositories with libraries to read and write related Open BIM formats including COBie and BIM Collaboration Format (BCF)
xbim Toolkit also supports IFC model verification with IDS using our IDS Library.
In order to visualise 3D Geometries you will need to include the Xbim.Geometry package which provides full support for geometric, topological operations and visualisation.
The motivation behind XbimEssentials is to take away much of the complexity and 'heavy lifting' required to read and write OpenBIM file formats, so you can focus on creating software solutions without needing deep understanding of STEP/Express parsing, 3D graphics - enabling you to work at a higher level than the buildingSmart data model.
Please see our ChangeLog for details on what's new and what you need to upgrade. In particular, please note the following section copied here:
BREAKING CHANGE: xbim Toolkit V6 implements a new mechanism for registering internal resources and makes use of standard .net Dependency Injection patterns for managing services internally.
Xbim.Commonnow introduces an internal DI service that you can optionally integrate with your own DI implementation, for providing Logging services, and configuring xbim service behaviour such as the model provider to use. E.g. Invoking:
XbimServices.Current.ConfigureServices(s => s.AddXbimToolkit(opt => opt.UseMemoryModel().UseLoggerFactory(yourloggerFactory)));registers the Toolkit internal dependencies, configures an In-memory model-provider and adds an existing ILoggerFactory into the service in place of our default one.
IfcStore.ModelProviderFactoryhas been deprecated as this is provided for by the above mechanism The persistent EsentModel is now available automatically through IfcStore (on Windows) so there is no need for theUseHeuristicModelProvider()'ceremony' to ensure Esent is used although you can specify it explicitly withXbimServices.Current.ConfigureServices(s => s.AddXbimToolkit(opt => opt.UseHeuristicModel())Note: The default Logging implementation has been removed from Toolkit to reduce the amount of external dependencies. To enable is a simple matter of adding your preferred logging implementation to the Xbim Services. See Example
If you want to jump straight in we have some examples on our docs site. But here's a 60 second tour of reading and writing:
Given an IFC File SampleHouse.ifc exported from a tool such as Revit, this is a simple example showing how you'd read and extract data, using LINQ:
…... resulting in output like:
…In this simple example we're going to add a 'purchase cost' property to a single Door. We could have applied the cost against the Door Type if all instances of it shared the property.
…We need to generate geometry from the IFC primitives before you can visualise the 3D model. This essentially produces a tesselation/mesh that can be fed into a 3D graphics card, typically via some Graphics Library (OpenGL, DirectX, WebGL etc)
Note: Generating the 3D Geometry requires the Xbim.Geometry package which is currently only supported on a Windows platform. This utililises a native C++ geometry engine to handle boolean operations / CSG
Since this process can take some seconds / minutes for larger models, and can consume significant computation resource, it's common to do the geometry generation once and store in the xbim database format for future use.
For web-based visualisation an alternative is to output geometry to the wexbim format, which is optimised for web delivery in a browser using Xbim.WebUI
…The XBIM Team have developed a couple of demonstrator apps to show how the toolkit can be used to develop your own applications. Both are open source under our team space on GitHub.
The Windows Xbim Xplorer application is functional demonstrator application that shows off most of the functionality in the XBIM toolkit. The app supports visualising and inspecting multiple model files, as well as supporting plugins to export COBie, import/export BCF and more.
The browser-based Xbim WeXplorer is a simple demonstrator of visualising models in a browser and an ability open sementic model data from a JSON structure.
You will need Visual Studio 2019 or newer to compile the Solution. Visual Studio 2022 is recommended. The free VS 2022 Community Edition should work fine. Other IDEs such as JetBrains Rider and VS Code should work.
To get started, the simplest approach is to add the Xbim.Essentials nuget package to your Visual Studio Project
from Nuget.
Alternatively you can add the package using Nuget's Package Manager Console and issuing the following command:
PM> Install-Package Xbim.EssentialsNote that Xbim.Essentials is now a meta package. For more control it will be possible to add the
dependent packages directly.
Pre-release builds are hosted in Myget. There are two separate feeds:
To access the Myget feeds add the following to your solution's nuget.config or the Visual Studio global settings:
As of April 2026, PDB debugging Symbols are no longer deployed with the Nuget packages. If you wish to debug the released xbim binaries please add the following Myget Symbol Server locations to Visual Studio as per these instructions:
XbimEssentials is a software library to be used for the creation of complex applications, other repositories under the XbimTeam page include a number of example applications to demonstrate its capabilities.
If you wish to move your first steps these are the first resources to lookup:
The example list page can act as a short tutorial to familiarise with the library.
Small examples - a list of small console application demonstrating how to undertake simple IFC activities with Xbim that compiles and runs in visual studio.
XbimXplorer - is a fairly complex WPF sample application that can open and render 3D IFC models as well as displaying semantic data, its source code is available in the Xbim.WindowsUI repo.
The XBIM library is made available under the CDDL Open Source licence.
All licences should support the commercial usage of the XBIM system within a 'Larger Work', as long as you honour the licence agreements.
The core XBIM library makes use of the following 3rd party software packages, under their associated licences:
All 3rd party licences are permissive-style licences. We actively avoid Strong Copyleft/GPL style licences to retain compatibility with our CDDL licence - meaning you can use the XBIM Toolkit in a closed-source commercial software package.
We have some guidance, examples and a FAQ on our docs site. We're always looking for help with areas like documentation - please see our Docs Repo if you think you can help with a PR.
For bugs, and improvements, please use the GitHub Issues of the relevant repository.
If you have a question, or need some help, you may find the Stackoverflow xbim tag a good place to start.
If you'd like to get involved and contribute to this project, please read the [CONTRIBUTING](https://github.com/xBim
暂无开放 Issues,或尚未同步最近议题。