IFC 4.1 Alignment Import/Export Plug-In

IFC 4.1 Alignment Import/Export Plug-In

f.rampf
Enthusiast Enthusiast
6,120 Views
15 Replies
Message 1 of 16

IFC 4.1 Alignment Import/Export Plug-In

f.rampf
Enthusiast
Enthusiast

Hey everyone!

My name is Felix and I am currently studying civil engineering at the Technische Universität in Munich. In the course of my Bachelor's thesis I developed an IFC Alignment Import/Export Plug-In for Civil 3D, which I want to share now.

 

The following figure shows the basic principle of the project:

workflow.png

 

The whole project consists of three different parts:

 

- IFC 4.1 Early Binding Generator:

A simple console application, that can read the IFC EXPRESS schema and create all the entities accordingly. This will include the correct class members, inheritance etc. and further gives every class a method so that objects of that class can write themselves with their set properties into a STEP string.

 

- IFC 4.1 Early Binding:

The according IFC class library containing all the classes. This is compiled into a *.dll and could theoretically be used with every other project, in order to implement IFC import and export.

 

- C3D IFC Alignment Plug-In:

This is the actual Plug-In that one can load into Civil 3D to import and export IFC Alignments.

 

 

In the following *.gif the basic workflow of the Plug-In is shown. To double-check my created files I always imported them into IFC Engine Viewer.

 

addin_demo.gif

 

In addition to the Plug-In, I also added a rough documentation about the project in the appendix of this post.

If anyone is interested in further information or the source code please let me know!

 

I am also happy about every kind of feedback!

 

As an end note, please consider that I had only just started coding with the beginning of my thesis last year in May, so clearly this Plug-In is not bug-free at this point, but it was only meant to show "how it's done" for the purpose of my Bachelor's thesis.

 

Regards,

Felix

6,121 Views
15 Replies
Replies (15)
Message 2 of 16

joantopo
Mentor
Mentor

Hi f.rampf.

Good job.

 

I sometimes work with the C3D API and I also have some plugi-ns.

 

I have a question about the IFC alignment format.

 

I was wondering if the official IFC alignment file by Autodesk actually contemplates the alignment entity type (constraint) = fixed,floating, free.

 

And if it also contemplates the input data type (2 points, passthrought point, etc..)

 

 

I drew an alignment with a Free SCS curve (spiral-curve-spiral) but when I open (import) the IFC file, that curve doesn´t appear.

I suppose that an alignment entity must be a single entity (1 subentity), and in this case, at least during the creation of the IFC, Civil 3D should crate 3 fixed entities.

 

Thanks.

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes
Message 3 of 16

f.rampf
Enthusiast
Enthusiast

Hey Joantopo,

I am not quite sure if I understood your question correctly, but please don't hesitate to ask again if my answer doesn't satisfy you! Let's break your post down into -- how I understood it -- the different questions.

 

"I was wondering if the official IFC alignment file by Autodesk actually contemplates the alignment entity type (constraint) = fixed, floating, free."

 

If I am informed correctly, Autodesk Civil 3D does not yet support the export to the new IFC 4.1 standard, which includes IFC Alignment. All the previous standards did not have an option to export alignment data. So to begin with there is no actual "IFC alignment file by Autodesk" yet. This is why I wrote my plugin. To facilitate the export of alignments to IFC.

All the IFC entities are described in the corresponding EXPRESS schema for the respective IFC version. Here is the (horizontal) alignment part of the newest IFC 4.1 release:

grafik.png

As you can see, there is only one way to describe the various alignment entities as they are all described in the according class structure. All the alignment entities could, therefore, be described as fixed elements.

 

However, in your code, you can surely just convert your C3D alignment entity data to the corresponding IFC data and vice-versa. That's by the way what I did for my Plug-In.

 

"I drew an alignment with a Free SCS curve (spiral-curve-spiral) but when I open (import) the IFC file, that curve doesn´t appear."

 

I don't quite understand this part of your question. Where did you draw the SCS curve? Did you draw it within another program? And did you then use my Plug-In to import it? (Or are you creating an alignment within your own code?)

If that's the case, then I need to tell you that my import functionality is highly hardcoded at this point because all I did was way too much for a Bachelor's thesis already anyway. So it only supports the import of Clothoid-curves at this point and even that I didn't have enough time to test everything.

 

Another aspect: There isn't much support for IFC Alignment on the market yet. So a lot of developers have their own options to import and export files, but some of them are still broken or not a 100 percent correct. So an actual flawless data exchange is still very hard.

 

I hope this answer helped you. If not, like I said, don't hesitate to ask again.

 

Regards,

Felix

0 Likes
Message 4 of 16

joantopo
Mentor
Mentor

Hi.

IFC 4.1 is already included in C3D 2018.2 (Service Pack 2) so I exported my alignment (created simply from C3D from a polyline).

 

That alignment includes a free SCS curve.

 

The issue I see in IFC is it treats any segment (entity) as a single entity when Civil 3d has particular entities with 2, 3...6 subentities.

So, the entity would be splitted in several fixed entities.. but you lose that setting (floating or free type) in the IFC.

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes
Message 5 of 16

f.rampf
Enthusiast
Enthusiast

Alright, now I see what the problem is. Exactly Civil3D lets you create alignment entities, which consist of certain sub-entities. But like you said, this is not possible in the IFC file format, because every entity is treated separately. So yes, you do lose this additional constraint setting.

 

When I wrote my Plug-In I split them too, although there are some more problems involved with that, than you might think. Especially when it comes to interchanging IFC-files between different software products (export from program A - > import into program B).

 

It would be amazing if all bigger software developer would agree on certain implementation methods to reach maximum interoperability between their created IFC-files.

 

I am just curious, why do you need this constraint setting in your IFC-file though?

 

If you're interested, here is the link to my Bachelor's thesis: Development of an IFC Alignment Import/Export Plug-in for Autodesk AutoCAD Civil 3D. It basically tell's you everything about IFC-Alignment and how my Plug-In works. I reckon, that the AutoCAD Civil 3D genuine IFC import/export works similar (just a little bit more professional ;)).

 

 

0 Likes
Message 6 of 16

joantopo
Mentor
Mentor

If an entity is a free entity then the tangential continuity (in both extremes)  is always insured.

At least in Spain, civil softwares recognize fixed entities and also they could play the floating and free types because they are already using them but in other words.

 

But if you have a free curve (1 subentity which is itself), the IFC converts it to fixed entity anyway.

 

So, the issue is if an entity has more than one subentity because I think this workflow is exclusive of Autodesk. Even I don't think PowerCivil uses this classification.

 

Regards.

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
0 Likes
Message 7 of 16

f.rampf
Enthusiast
Enthusiast

Hey JoanTopo,

I know it's been a while since this post has been last active, but I just downloaded the recent Autodesk Civil 3D version including the newest update/service pack, that should support IFc export and import. However, when I export my drawn alignment and try to viel it in IFC Viewer it does not show correctly when my exported file produces the correct file, so you might want to be careful using the built in IFC export function ;-).

This is my example alignment:

original.PNG

This is the output in third party software when I used the Civil 3D built in IFC export:

autocad.PNG

And this is the output I get, when using my export addin:

correct.PNG

So something seems to be not quite right yet.

 

Regards

 

0 Likes
Message 8 of 16

Anonymous
Not applicable

Hi I was trying to install it but i cant. I tried NETLOAD and i receive nothing . Does someone could tell me how to install and load this plugin ?

0 Likes
Message 9 of 16

f.rampf
Enthusiast
Enthusiast

I think this is, because I was using the same command Civil3D now uses for the proprietary IFC plugin. I am currently looking into this and will update you as soon as I resolved the issue.

0 Likes
Message 10 of 16

f.rampf
Enthusiast
Enthusiast

Hi Mike,

the issue should be resolved now. I think the issue was the .Net Framework version I used for compiling. The plug-in should now work with the newest Civil3D version 2019. Make sure you make the "Add-ins" tab show to see the plug-in. After you used netload, type: "FF_IFC"  to make the button appear in the Add-Ins tab.

If you got any further questions don't hesitate to contact me. I've attached the newest version.

 

Note: I developed this plug-in in the course of my Bachelor's thesis before C3D offered their own IFC export/import. I am sure the proprietary IFC export and especially the import works far better than mine. I also haven't maintenanced this product in the last year, so keep that in mind. However, I am happy it is still relevant in some way.

 

Regards,

Felix

0 Likes
Message 11 of 16

moonlikestoneBX57A
Enthusiast
Enthusiast

Hi, Felix:

Your research help me more, I follow your step to develop the IFC export of tin surface, and it works fine! 

On the other hand, Can you provide the mapping table about alignment segments between the civil 3D and IFC model?

When I develop the IFC export tool, I could not known how to mapping those information!

 

Regards, Jing

0 Likes
Message 12 of 16

f.rampf
Enthusiast
Enthusiast

Hi Jing,

since the development of this plug-in is part of my Bachelor's thesis, the mapping is described in more detail within the thesis. Therfore, I'll provide you with the link to my thesis:

Development of an IFC Alignment Import/Export Plug-In for Autodesk AutoCAD Civil 3D

(If you can make use of any of this in your research, I would be very happy with a citation Smiley Wink)

If you got any more questions, don't hesitate to contact me.

However, although I describe, which C3D-element is being mapped on which IFC-element, the mapping itself sometimes involves certain conversions, since the represenation of some alignment elements in C3D is different to the represenation of the according IFC alignment element. This can be solved with some fairly simple math though.

 

Regards,

Felix

0 Likes
Message 13 of 16

olivier.berrier
Contributor
Contributor

Hello,
congratulations for your thesis, it's a good job !
I had to create a similar command "IFC alignmeent import/export" In AutoCAD for my company, and I see that you encountered some problems that I had to solve too.
I have one suggestion : in chapter 4.4.5, you could export your TIN surface to a IfcTriangulatedIrregularNetwork (as described in chapter 3.3) : the Civil API has a property "TinSurface::BreaklinesDefinition" which access to the breaklines datas.
Thank you.

Olivier BERRIER
www.geo-media.com
Message 14 of 16

f.rampf
Enthusiast
Enthusiast
Hi Olivier,

thanks for your message! The main challenge of the thesis (although it's
not part of it really) was the the development of the IFC Early Binding
in C# and a respective Generator, so that I didn't have to write all the
classes myself. The thesis was just giving a basic approach on how to
write such a plug-in, because at the time of publishing, there did not
exist such a plugin written by Autodesk (Now they did add a plugin).

I am still developing the C# Early Binding and I can now export and
import every IFC-Entity. However, I am trying to further develope the
Early Binding in respect to performance and usability to maybe
eventually release it or to create my own IFC-Viewer/-ModelChecker-App.


Regards,

Felix

Message 15 of 16

Anonymous
Not applicable

Can share source code for "C3DIfcAlignmentPlugIn" c# code even i am uanble t find //The IFC class library
using Ifc4x1; in my pce can u  hep me

0 Likes
Message 16 of 16

quangpt.tric
Advocate
Advocate

Hi @f.rampf ,

Could you send me the dll file that can work on civil 3d 2021 to 2024?

Thank you in advance!

0 Likes