使用C#创建IFC文件
有谁知道使用C#创建IFC文件或至少IFC对象的广泛方法? 我正在尝试根据由C#编码的计算产生的类实例创建对象。在这种情况下,使用像Revit这样的创作软件的API不是一个选择。
我只知道这个资源,但它似乎不包含创建对象的方法,只有几何形状: https://docs.xbim.net/
将对任何提示或方向指针表示感谢! 欢迎在其他编程语言中进行同样的事情的信息。
非常感谢!
Does anyone know if there is already a widespread way of creating IFC files, or at least IFC objects, using C#?
I am trying to create objects based on class instances that result from a calculation which is coded in C#. The use of APIs of authoring software like Revit is not an option in this case.
I know only this resource, but it doesn't seem to contain a way of creating objects, only geometries:
https://docs.xbim.net/
Would be grateful for any hints or direction pointers!
Infos about doing the same in other programming languages are also welcome.
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个相当全面的示例创建一个ifcwall元素/对象:
https:// docs.xbim.net/examples/proper-wall-in-3d.html
和github中的完整示例 https://github.com/xbimteam/xbimsamplees/blob/master/master/hellowall/hellowall/hellowall/helledall/hellowalllexpample.cs
,它证明了创建对象的创建对象,包括(包括)几何学)。 XBIM必需品可让您读取并写入整个IFC模式,其中包括几何形状。但是,如果您只想创建一个元素,那就很简单了:
这只是将墙元素添加到结构中的问题。该示例中使用的助手是将墙添加到建筑物中的助手:
最后,您将模型保存到IFC步骤文件中。
There's a fairly comprehensive example creating an IfcWall element/object:
https://docs.xbim.net/examples/proper-wall-in-3d.html
and the full example in Github at https://github.com/xBimTeam/XbimSamples/blob/master/HelloWall/HelloWallExample.cs
That demonstrates the creating the object and a lot more besides (including geometry). xbim Essentials lets you read and write the whole IFC schema, which can include the geometry. But if you just want to create an element it's pretty simple:
Then it's just a matter of adding the wall element to the structure. There's a helper for this used in the example to add the wall to the building:
Lastly you'd save the model to an IFC Step file.