BlenderBIM - Save material on elements?

Hi,
I want to import/load an .ifc file, duplicate an object, move it etc, and export the .ifc file.
When duplicating the object, it is displayed correctly with ifc class, shaperepresentation, material etc., but when I export and then import the file, that object doesnt have a material assigned anymore.
Does anyone know how to keep the assigned material when exporting the .ifc? Attached is my example .ifc file.
BR Sondre

Comments

  • Sorry for the third post in half an hour, but it basically boils down to: "How do I export a shape to .ifc and correctly import it later". I am able to create advanced shapes using eg. bisect and/or a boolean modifier, I copy the ifc class and avoid duplicate guids, set origin to 2D cursor in origo, applies all transforms, updates ifcrepresentation, exports what looks perfectly fine to me, simply to import what I guess are the bounding box only, at least its not what I am trying to achieve: I want the shapes I exported back on import. As always, I appreciate any help:)

  • There was no IfcMaterials in your C-Fase1Veg.ifc file, only blender materials.
    The following video shows creating an IfcMaterial and assigning it to an object.
    If you want to assign multiple materials to an object, i think you have to use IFC4 schema, vs. IFC2x3. It allows for IfcMaterialConstituentSet
    https://www.dropbox.com/s/o07kz1b7hdf5ewl/2022-09-16_07-24-44_Blender_blender.mp4?dl=0

    BIMrookie92
  • edited September 2022

    Sorry, i split your question at the same time @Moult answered, so the order doesn't make sense anymore, so posted your question here again...

    The shape representation of your wall was defined as an extruded rectangle. You have to change it to a tessellated representation, for it to 'remember' its shape.
    https://www.dropbox.com/s/dosd8ydxzm35gdd/2022-09-16_07-49-20_Blender_blender.mp4?dl=0

    BIMrookie92
  • The BlenderBIM Add-on is a native IFC editor. So not everything that you can do in Blender will work in IFC. We're slowly improving the UX to guide users, but unfortunately right now it takes a bit of knowledge about the world of IFC and BIM.

    In Blender, there are meshes, curves, and a few other funky things like metaballs, particles, etc. In BIM, there are solids (typically parametric), tessellations (mesh-like things), and a few others too. Those walls, for example, are extruded solids based on a profile and a prismatic extrusion, thus you cannot "slice" through it diagonally like you have as a mesh. That's why it did the second best thing, which is to create a vertical cut. So always remember: just because everything looks like a mesh in Blender, doesn't mean it actually is. Typically most simple objects (walls, slabs, columns, beams, pipes) in BIM are solids, and most complex objects (doors, furniture, fixtures, equipment) are tessellations.

    You can check the geometry type in Object Properties > IFC Geometry > IFC Representations.

    Your options are either to 1) convert to a tessellation in Mesh Properties > Update Mesh As Tessellation, and then edit it as you wish, or 2) leave it as a solid extrusion, and wait for an upcoming feature where "half space solid" booleans are supported (which will come very soon, as it's critical in almost all solid modeling and is long overdue).

    BIMrookie92vpajicCadGiru
  • Wow, thank you both very much:D
    I might ask once more about the material disappearing after export-import on duplicate elements, but in that case I will make sure I upload the correct .ifc file..

  • After reading theoryshaw's first answer more thorough (I guess I was overwhelmed by the response:p), I think your answer perfectly answers my question:) I will give it a try, but unless I fail once more, I think we can assume this thread is solved:D

    vpajic
Sign In or Register to comment.