JPG image to Revit geometry script taking a long time

Hi everyone,

I’m a relatively inexperienced user of Dynamo, I can figure out some of the basics and I often rely on ideas and help with building my scripts from the internet.

I found a script online called Img2model, as shown on this site: https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/simplecontent/content/how-to-convert-raster-photo-to-3d-model-revit-dynamo.html

I’m working on a project for a new school in Nuuk, Greenland, and we would like to make some perforations in our aluminium facade, with a painted back panel. The perforations are made so that they represent some sort of an image.

Instead of making actual perforations in our model, I have created a family in which I have a hosted coloured cylinder family which represents the holes.

I’m working with BW images that I reduce to about 120x200px and run the script. I then further reduce this image in Dynamo by a factor of 2.
My problem is that the script is very slow, the first run took about 15 min, the next one 45, and the last one I stopped after a few hours.
I have since tried reducing the image by half already in Photoshop, but it doesn’t seem to help, since I’m already over half an hour into my latest run.
I also read up a bit on Element Binding, which I reckon could be the culprit, but I don’t really understand what I’m supposed to do differently.

Unfortunately, I’m not allowed to upload files as a new user, so you can find them on this wetransfer link instead, let me know when it’s expired and you still need the files and I will upload a new one: https://we.tl/t-UwGLPjdwvE

I would very much appreciate any kind of help, all from small adjustments to my script, to larger adjustments, fixing any potential memory leaks, or a completely different approach that you would recommend instead, be it in the form of Dynamo or any other ideas of how to computationally convert a raster image into a vector representation in Revit.
I can tell that my first idea was to load an already edited image with only black circles on a white background as a perforation bitmap in a Revit material, but have since abandoned the concept because the material gets wrapped around a 3D element twice and creates interference, plus, we will eventually need to produce a vector file for cutting the perforations into the Alu panel.

Thank you very much for your help,
Kind regard,

Jan