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:
either we import a 3d DWG and try to delete all the unnecessary elements (too long!)
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.
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.
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?
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.
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…
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.
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…
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.
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
next if d.image?
next if d.group?
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…