OSArch Community

[BlenderBIM] - Storing reference drawing with the Ifc?

  1. C

    @theoryshaw said:

    @Coen Hi, would it be possible to save relative links as well? With our repo workflows with collaborators, the absolute path is always different.

    I just discovered you can just set any string you want in the folder menu of Blender, however when I write it as a property in IFC it just turns into a dumb string and I can't use it anymore as path. Any suggestions?

  2. T
  3. T
  4. G
    
    from pathlib import Path
    
    path = Path(your_path)
    

    ? pathlib is supposed to be the successor of os.path so I suggest you try to use it as much as you can.

    @carlopav I'm working on something thanks to @Coen 's script I took inspiration from. Here's a snippet.

    I just have to find a way to store the clip planes live object matrix and it should be all good

  5. C

    The following snippet is supposed to delete a pset by name, but it doesn't work, I might be doing something wrong.

    
    ifc                 =   ifcopenshell.open(IfcStore.path)
    
     element             =   ifc.by_type("IfcBuilding")[0]
    
    products            =   ifc.by_type('IfcProduct')
    
    
    for ifcproduct in products:
    
        if ifcproduct.IsDefinedBy:        
    
            for ifcreldefinesbyproperties in ifcproduct.IsDefinedBy:
    
                if (ifcreldefinesbyproperties.is_a()) == 'IfcRelDefinesByProperties':
    
                    if ifcreldefinesbyproperties.RelatingPropertyDefinition.is_a() == 'IfcPropertySet':
    
                        if (ifcreldefinesbyproperties.RelatingPropertyDefinition.Name):
    
                            if (ifcreldefinesbyproperties.RelatingPropertyDefinition.Name) == active_object_name:
    
                                ifcopenshell.api.run("pset.remove_pset", ifc, product=element, pset=ifcreldefinesbyproperties.RelatingPropertyDefinition)
    
                                bpy.data.objects.remove(bpy.data.objects[image_name], do_unlink=True)
    

    I want to delete a pset looping through all the psets names until there is a match, but it creates nested for loops and if statements. The code smell is horrendous. Is there a better way of doing this?

  6. G
  7. C

    I also think that import images as planes is probaly a more accurate way of importing an image, this way I can set the origing point at (0,0,0) and just measure a random dimension line somewhere and calculate and set the scaling factor. Instead of creating a reference object to scale along to. In my opninon the fastest and most accurate way of scaling an image for reference. Any thoughts?

  8. C

    Also this way you can see the grid and the drawing.

  9. G

    This would also be a nudge in the right direction for native image references because Images as planes are just quad meshes with an image texture assigned to it. If it was supported in ifc (I have a feeling it is, but it needs to be correctly written / read by the blenderbim addon too), you wouldn't even need to jump through hoops with your addon to have reference images.

    Btw if you want to see an image in the background you need to set the Depth to "Back"

  10. A

    Hey @Coen thanks for the amazing little addon again! I'm trying to use it again and not sure where to download the file from?

    Is it one or all of these py files?

  11. C

    @Ace said:

    Hey @Coen thanks for the amazing little addon again! I'm trying to use it again and not sure where to download the file from?

    That add-on is a work-in-progress, it's not finished yet. But the basic functionality is there of storing an image with file path and blender position, location, rotation and scaling in an ifc propertyset. I want to be able to add relative paths as well.

    I haven't made a zip yet, but if you git clone it. I think you coud just zip the folder BlenderBIM_add_reference_images and use that to install the add-on.

  12. A

    Managed to get it installed thankyou Coen!

    Listen, the functionality is essential for a lot of work, so even a work in progress is helpful as heck, thanks man

  13. A

    @Coen said:

    I also think that import images as planes is probaly a more accurate way of importing an image, this way I can set the origing point at (0,0,0) and just measure a random dimension line somewhere and calculate and set the scaling factor. Instead of creating a reference object to scale along to. In my opninon the fastest and most accurate way of scaling an image for reference. Any thoughts?

    This is definitely a more logical approach, the only benefit of the scaling with a reference is that it is very visual and intuitive

  14. A

    @Coen said:

    So, next time you open your Blender session, you only have to click Load Reference Image

    And the image you wanted will appear exactly where you kept it the last time:

    I think this functionality isn't working with the latest BlenderBim, it doesn't seem to be storing the image path when you click the button

    No stress though like you said it is a work in progress haha

  15. C

    @Ace

    Will definitely take a look when I have time, don't know when that is. :-)

  16. C
  17. T

    Is there a current workflow, like this, that people are using? Or is this still an open issue?

  18. A

    Still an open issue for sure

  19. S

    It's not the same process, but I've worked with PDF --> SVG --> IFC annotation. Works like a charm.

    Initially I thought of using IFC links rather thank keep the imports within the same model, but I discovered this bug. So I imported things instead.

    I made a video on it :

  20. B

    Hi @SigmaDimensions , would it be possible to alter your YouTube settings so that we can get notifications when you upload a new video (the Bell Icon)?

    Thanks for your hard work.

  21. S

    @Bedson said:

    Hi @SigmaDimensions , would it be possible to alter your YouTube settings so that we can get notifications when you upload a new video (the Bell Icon)?

    Thanks for your hard work.

    Cheers @Bedson ! Not certain, but perhaps it's your youtube settings : "To get all notifications from a subscribed channel, tap the Notification bell ." source

  22. B

    Possibly a problem on my side....although YouTube restricts notifications if a channel's audience is set as “made for kids.”

  1. Page 1
  2. 2

Login or Register to reply.