ArchiCAD to Sketchup via IFC

Dear Forum Members,

are there any ArchiCAD users amongst you? I need an advice on the model transfer ArchiCAD > IFC > Sketchup.

Eventually we need a gbXML-style geometry for our Energy Analysis tool (Archiphysik). We are engineers, and not architects, but most of our partners work in ArchiCAD. There is a direct plugin for Archiphysik, but it is for now too complicated to implement this kind of connection (we are a small lab and work with different architects all the time…)

So there are two opportunities:

  1. either we import a 3d DWG and try to delete all the unnecessary elements (too long!)
  2. or we import IFC and delete the unnecesassy components there.

Now the problem with the DWG option is that we have thousands of little elements: like handrails, which are hard to select in SU. But here we can set the option to merge coplanar faces, which helps to avoid splitting the flat faces into triangles.
In the IFC we can select the components, which are neatly grouped, but then if we go down to a single wall, it is represented with multiple triangles again…

My guess is that there must some options of IFC export in ArchiCAD, which would help to avoid this kind of surface splitting.

Any guess on the latter?..

Option 3 would be to export directly from Archicad to SketchUp (works from the 3D window in Archicad).

The Archicad IFC exporter has multiple configuration options, so trying a different one might help, depending on what was used in the model you got. The triangulation might be a “feature” of the SketchUp importer. I don’t see visible triangulation when viewing Archicad-exported IFC models in Solibri or BimSight. Of course, triangles are behind all on-screen 3D computer graphics. At heart, Archicad is a surface modeller like SketchUp and unlike Revit.

Anssi

1 Like

I posted a ruby script somewhere on the forum to remove all these edges pretty fast [after import]…

If your only after certain elements you can extend the script to delete all other…

john

1 Like

Hey Anssi, thank you for your quick response!

Yes, my idea was to ask if anyone already tried different IFC exporter options and what was the result. They have pretty good guidance on the help page http://helpcenter.graphisoft.com/guides/archicad-18-int-reference-guide/interoperability/file-handling-and-exchange/working-with-ifc/importexport-settings/ But I do not have ArchiCAD at hand and can not really experiment with it at the moment.

Direct IFC import in SU is a new feature of the 2016 version (as far as I know), so yes, I think the problem occurs there. I did not know that there is the direct export to Sketchup from ArchiCAD, since in my architectural days I was mostly working with Revit. Hence, my knowledge of Archicad is pretty basic. But I expect that the result might be similar to what happens with DWG: all the ArchiCAD elements are exploded. Meanwhile what I liked about IFC is that hierarchy and grouping of the elements is preserved, which means I can navigate through the model easier.

Thanks a lot! I will search for the script. I have no experience with scripting for SU, but I gues it should not be that complicated. It must be a nice workaround the problem. Basically, this is what is already implemented in SU for the DWG files, right?

I suppose this is the topic that @john_drivenupthewall is referring to How to check if component is classified, unhide compnents whith special attributes

yes, that’s the post…

the first deletes the coplanar edges on all faces of all components…

to ‘run’ the code you need to paste it into ‘Window’ >> ‘Ruby Console’ and hit return…

try it on an import, does it help?

if you only need a few categories, I would delete the others first [using a filter in the code] and remove the edges from the remaining…

if you post a ifc file, and a list of what you need, further suggestions could be made…

john

hey John, was trying out your script (first one in the list for coplanar edges).

For now the SU simply gets stuck on the way and never comes back to life. The model is relatively big, two buildings in one file, the resulting SU file size is circa 50 MB. On top of that not sure if I am allowed to share the model - it belongs to architects, with whom we are working. I will experiment with simplier IFCs to test how it works.

(edit) works perfectly with the simple model. I will try to delete the components first, and then clean it up.

with most files I run them through Solibri IFC Optimizer first…

it removes a lot of program specific extra’s added by the different apps…

then run the scripts on the optimised copy…

john

1 Like

Your file is very large, it can comprise millions of polygons. How long did you let John’s script run? It might take hours.

I too recommend Solibri IFC Optimizer to everyone. I don’t think that it affects the model geometry, though.

Anssi

1 Like

thanks! I will try different options.

About the script-1: does it supposedly move the elements to the newly created layer?.. It hides them all right, but when I go inside the IFC story element and select the hidden Wall element, it still shows me that it is at Layer 0. (Even though the model was imported onto a different layer…)

(Edited: It was solved by the SU operation. The programm suggested to “fix the problems in my model” and after that the elements were on the correct layers…)

to clarify, the first script erases the coplanar triangulation on ‘all’ faces, thats why it can take a very long time…

the second example creates a new ‘hidden’ layer for IfcSpace elements…

layers = model.layers
space_layer = layers.add("IfcSpace")
space_layer.visible = false
space_layer.page_behavior = LAYER_HIDDEN_BY_DEFAULT | LAYER_IS_HIDDEN_ON_NEW_PAGES

the code was originally an ‘experiment’ based on a similar discussion on a private forum, a few people supplied models that I played around with…

it could certainly be improved as it’s really a ‘proof of principle’ rather than ‘production ready’…

john

to clarify, the first script erases the coplanar triangulation on ‘all’ faces, thats why it can take a very long time…

sorry @john_drivenupthewall , there was a confusion caused by my words. I am not able to test your script-1 until I clean up the model. So I was using the script-2 to clean it up first (where indeed the elements were hidden at the end, but stayed at the Layer 0 until SU did some “fixing of the model”). I will instal Solibri IFC Optimizer soon and try it out as well.

I have asked for a test IFC model similar to the one I am using which I could share here, so that we can test it and see what could be improved… I need to get a bit more familiar with Ruby though.

Dear all!

can somebody tell me why do I get a Sketchup file of 58 Mb after I import IFC which is 4,5 Mb big?..
I ran the IFC through the Solibri optimizer, now it is 4,5 Mb instead of 9 Mb, but it had no ifluence on the size of my Sketchup file…

Is there a way to optimize the Sketchup file?

Can you somehow share the IFC? If you zip it it might get small enough to post here?
What I am suspecting is that the IFC exporter you use in Archicad results in a proliferation of imported component definitions in SketchUp, if, as in some exporters to AutoCad, every Archicad object results as an unique component in SketchUp.

Just guessing. I haven’t often needed to import IFC, so I just tried an old one of mine. It was 4,6MB and the resulting SKP is 12,1 MB. I ran the IFC through the IFC Optimizer that reduced the size to 2,16 MB but there was virtually no difference in file size when the resulting SKP was saved. My IFC file also came from Archicad.

Anssi

I’ve tested a few and due to each having it’s axis at origin, SU treats each as unique object…

i.e. it adds no optimisation for repeated geometry like it would for 1000 components…

if SU is the end of process for the import, you could use a plugin to make identical geometry back into SU components…

I think @thomthom or @ChrisFullmer had one…

john

I experimented with a script, yes - but never got to complete it: http://sketchucation.com/forums/viewtopic.php?t=30143

It some times work for some models - sometimes not.

Thank you for your replies! Unfortunatelly I can not share the IFC model, since it does not belong to me.
I plan to experiment with the scripts that were shared here by john and now also by thomthom. I will share the results here.

My idea is somehow to hide part of the model and maybe run the script only for the visible elements. Hopefully it helps to minimize the running times. Still need to find out if it is possible in Ruby.

The further interesting possibility for me is to filter out the elements without the assigned materials. This way I can delete all the inner walls, which belong to the IfcStandardWallCase class.

Among other problems I experience in using the script from John to remove certain IFC components to the new layers, is the effect that I can not hide the unnecessary levels: no matter where the single IfcWindow or IfcFurniture elements are moved, the parent IFC element stays on Layer0 (how was it called exactly, IfcProject? IfcBuilding?..) .

the outer wrappers can be exploded as a first step if you don’t need them…

    model = Sketchup.active_model
defs = model.definitions

defs.each{|d|
            next if d.image?
            next if d.group?
            d.instances.each{|i|
            i.explode  if i.name =~ /IfcProject / or i.name =~ /IfcSite / or i.name =~ /IfcBuilding /
          }}

I’ll have a look if that effects the other scripts…

john