If you're reading this, we've just migrated servers! If anything looks broken please email dion@thinkmoult.com :)

[BlenderBIM] Workflow for aggregating models with disparate coordinates

edited November 2022 in General

Hi community
I've only started tinkering a tiny bit with Blender and BlenderBIM. So far, my time spent studying blender via YouTube strongly outweighs my hands-on-time, but I'm working on shifting that balance :D. Anyway - I feel the time has come to start utilizing BlenderBIM to mitigate an everyday annoyance at work.

What I'm searching for is a simple, robust, software/file format agnostic workflow for poking random 3D geometry (mostly IFC files) from various subcontractors into their correct position in space. Save this in a new IFC file and let it into the already existing collection of spatially coordinated ifc files made by architects and engineers (all Revit).

Here's a concrete example… Would it be possible to:

  1. Create a new file – let’s call it MyFile.ifc - in blender (This I can do - https://blenderbim.org/blenderbim-tutorial.html ?).
  2. Alongside the MyFile.ifc, I’m also saving the blender file from which it was created. Let’s call this one MyFile.blender.
  3. Now I want to link a spatially correct structural model into MyFile.blender – just for reference, so that I have something to aim at.
  4. Then, I would like to link in a spatially incorrect model, e.g., a model containing one steel balcony from a subcontractor. This model could be in IFC. But depending on the software vendor that they are using, another (lighter) file format might be desirable. A couple of examples could be Inventor or SolidWorks. Software which I have no license for, nor knowledge about. And the subcontractor has no clue on how to export an IFC with the coordinates I desire.
  5. Now I want to copy/duplicate multiple copies/instances – let’s say 20 pcs - of this one balcony type into MyFile.blender . (I’m aware my Blender-lingo is not precise, and that getting this right is probably crucial for this workflow to work. I’ll use instances going forward ?).
  6. Now I want to nudge these instances into their correct position relative to the structural model, and
  7. Export these 20 instances (and nothing else) into MyFile.ifc

Bonus steps – Not crucial, but it would be brilliant if it’s possible:
… Two weeks later, there’s an update to the geometry of the steel balcony type. The placement of the balcony slab is unchanged relative to the previous version, but the brackets connecting to the structural model has been updated….

  1. Now I want to create a new version of MyFile.ifc with the new steel balcony geometry. To do this I imagine that I’ll open up Myfile.blender and update the link back to the steel balcony file (preferably by simply swapping out the old file with the new in windows explorer). And export a new MyFile.ifc

notes:

  • I’ve tried CAD Transform for blender, and find it easy/familiar to use – I hope it’s okay to use a tool like that, if I only use it for simple move/rotate/etc commands?
  • I’m not super focused on getting story/level or IfcType or other metadata right. The first step is to simply overlay and coordinate geometry.
  • The structural model is georeferenced (see image below), and I expect I’ll need to copy in those coordinates into MyFile.ifc the balcony file is not georeferenced – what implications might this have?

Am I reaching beyond the capabilities of blenderBIM or could this dream of mine come true?

Fingers crossed!
/Aksel

Comments

  • ? @Moult - Because you're the only BlenderBIM superstar I have really noticed so far. Feel free to poke other superstars ? who could help shed some light on the topic.
    ? @duncan - Because we've spoken earlier (in Danish!). And given your involvement in OSArch, you might be able to put me in contact with others in Denmark that are keen on using BlenderBIM and maybe discussing solutions to the above.

  • [Off Topic] hi Aksel ( @akselt ) that's a very good question. Can we have a chat about that somewhere? Maybe ping me on Matrix ( @dunlit:matrix.org ) or some other way? I have a long list of people in AEC in Denmark who have shown some interest in FOSS for AEC but so far I've done very little with the list. It would be great to hear your ideas about how we could activate the list. If we could get BIM Aarhus or BIM CPH interested in a presentation that would be interesting. I'm just not sure I have time to manage the result.

  • If your goal is only to work with geometry, you can consider at first until your workflow is foolproof not having the overhead of ifc which enforces associating a bunch of data with projects, entities and their geometries. There are already established file formats for sharing geometry such as .obj, .fbx, .gltf, .dae, and even directly .blend in some cases, but mostly for video game engines.

    Some if not all are proprietary, but most of them can be exported / imported from most 3D softwares, although in recent years there has been some predatory moves from some vendors to prevent interoperability.

    It is really straightforward to tie geometry to objects in Blender, and also to link a single geometry to several objects. You do that by linking object data. If you want at a later point to swap the geometry for another one, you can simply select all your balconies and the new one and use the feature to link object data to the new one. You just have to be mindful about the object location in 3D space, because sometimes the real world location is different from the local object location and swapping geometry may create a different result than expected.

  • @Gorgious
    I appreciate your input! The link will probably strengthen my understanding of linked object data /linked duplicates in blender. I'll have a good read when I'm back at the computer.

    However, the point of having the end result in an IFC file is to be able to aggregate the geometry in softwares like BIMcollab ZOOM (where we manage issues between technicians) and Dalux' embedded BIM viewer (where hundreds of project participants, could potentially benefit from seeing the actual production geometry).

    I haven't played around with Blender+BlenderBIM enough to figure out what IFCopenshell will process, and what makes it throw errors. I guess that's the root my question really ?.

    I'm open to trying other FOSS tools (FreeCAD?) that can solve this particular task. But I'm hoping that my endeavours towards learning blender, will eventually have me using Blender+BlenderBIM as my Swiss army BIM-knife wrapped in a flexible and attractive interface for years to come...

    @duncan
    I'll ping you ?

    duncan
  • Okay, fair enough I understand your intended workflow. Maybe you can take a look at the dotbim project https://github.com/paireks/dotbim , I saw Moult mention it several times and he's already created a simple bridge with Blenderbim https://github.com/Moult/dotbim-ifc

  • edited February 2022

    I think the easiest approach would be to simply have one or more IFC models, and just use the OffsetObjectPlacements patch recipe to shift them into the right spot.

    If you fire up Blender (no need to load your IFC project - you can do all this in a fresh Blender session), then in the Scene properties, scroll down to IFC Quality Control -> IFC Patch, select OffsetObjectPlacements. Browse to your input IFC file, then (optionally) choose an output IFC file path (if you don't specify one it will overwrite your input). Then in the arguments text box fill this in [0,0,0,0] - the 4 numbers correlate to X, Y, Z, and angle of rotation. So to shift your model 100 (project units, could be mm, feet, inches, meters, etc) in the X and Y, and rotate by 45 degrees, do [100,100,0,45]. Press execute and then you should see, such as in BIMCollab Zoom that it has indeed shifted and rotated.

    If your version is older than 12 days ago, make sure you apply this patch to your OffsetObjectPlacements Python file, otherwise although it'll work, it'll translate and then rotate, which can be unintuitive compared to the new default which is rotate then translate: https://github.com/IfcOpenShell/IfcOpenShell/commit/80bc4cdb1b6e91fe2f62757b7fb50addf374879c

    NigelJohannes990RaphaëlVouilloz
  • Maybe this discussion can help.
    https://community.osarch.org/discussion/comment/8318#Comment_8318
    In my experience, Blender can't deal with "big coordinates" (UTM coordinates with 4 millions) and the approach I have done is, if you create your models in Blender, work in "locale coordinates" and after the IFC model is generated, "translate" it to the right coordinates. If you want add ifc files to your blender model, you need put this new files in the "locale coordinates" used in Blender and import-them. This can be done with IFCToolbox without edit the ifc files but I not tested it in deep.

  • Found this thread while struggling with geolocation and ifc aggregation - my understanding was, that it is possible to have two ifc files (say two buildings) with different map conversions linked into one. However if I use the link ifc function (or the merge recipe), BlenderBIM ignores the map conversion of the linked file? I've attached two ifcs, I just changed the Orthogonal height in one of them. I would expect when I link them the arrows appear at different height positions.
    Also, why do I have to link a .blend file and not just an ifc?

  • Hi JanF,
    I think the problem is that you changed data in a wrong place inside the ifc file, and how object position are referenced inside the ifc (relative to other objects like building, site, etc. or with "absolute coordinates"). In your file it seem the object are referenced to "absolute coordinates" and even you change line 35 (#28=IFCMAPCONVERSION...), objects coordinates are the same and render in the same place.
    I attach a modified version of your file with changes in Z (line 98 with #91=IFCCARTESIANPOINT((0.,0.,5.));) and load in blender as expected.
    This behaviour (how coordinates are stores in ifc file) has changed in different versions of blenderbim.
    To link a blender file, use File->link. This has limitations if you want do thigs with this objects If you want add objects from other blender file, use File->Append, choose the blender file (doble click show directories of this blender file) look for object directory and select the object you want. Object are added at the same coordinates that it has in original file.

  • Thanks gor your input. I know how linking in blender works and I was assuming linking in blenderbim worked in a similar way, just with ifc files, so I don't understand why it looks for a blend file.

    As for the position - you say they have absolute coordinates. Ok, but the map conversion is supposed to offset the origin of the "absolute coordinates" isn't it?

  • I don't know in deep how "objects coordinates" are implemented in blender bim. I tested Blender 2.83.4 with blenderbim 201207 version (with ifc 2x3 projects) and you can consider objects positions are relative to IfcBuilding object. Changes in IFCCARTESIANPOINT associated to IfcBuilding move all objects to new position (I used this to move a complete ifc file from relative coordinates to real UTM coordinates succesfully). After this versions I'm not sure how it work.
    In new BlenderBim versions you can use "Advanced Mode" when open an ifc project or import ifc files inside a project. With this, you can import and offset data acording to your needs. After check "Enable Advanced Mode" when import, in Scene Properties-> IFCProjectInfo-> IFC Projects you can see some options: "Model Ofset Coordinates" allow to put your right coodinates (small changes in panel among latest versions but you can try the recent 221105).
    As I know, with blenderbim you can import ifc files to the current project but not link (as external reference in autocad). Link work with blender files and think ifc file used with blenderbim is not the same.

  • @avico said:
    As I know, with blenderbim you can import ifc files to the current project but not link (as external reference in autocad). Link work with blender files and think ifc file used with blenderbim is not the same.

    Well this

    and this post
    https://community.osarch.org/discussion/comment/5427/#Comment_5427
    suggest to me it is possible and it works more or less as expected, but I have to select a blend file with a blenderbim project instead of a plain ifc file and that I don't understand.
    Also it links the whole project and doesn't merge the project/site/building structure even if they have the same GlobalID

  • Hi JanF,
    Thanks for the comment. I didn't test IFCLinks but is true. You can link a blender file with a IfcProject in it (need to load ifc file and save as blender file). I supose blenderbim uses a "blender gateway" to link the file and it can't do it directly over ifc file.
    In fact, there is a lot of things I haven't tested in blenderbim. My knowledge about this is read posts, look videos and read the docs. It is not easy (at least for me and the time I have) follow all what Moult add (thanks Dion :-).)

  • related: see my last comment on this thread. It's possible now to link IFC directly, albeit with some faults/bugs.

Sign In or Register to comment.