Circles Pattern from Raster or Vector Image?

Hello everyone, as you can see in the image attached i am looking to recreate a custom circles pattern.

It is a raster image and it has a fading effect created by changing the circles size progressively, it does not follow a specific fading pattern and angle as you can see and at times it gets “cut” with straight lines.
This would be practically impossible to do manually in a reasonable time and precision.

Is there any way we can translate this into 2D circles and export it to DWG or DXF or any other format readable in Autocad?

If you are trying to work with an image to make the holes, not sure what options there are which are accurate enough for fabrication; likely best to try and vectorize the image directly in AutoCAD and then clean it up manually.

If you are looking to make the pattern from scratch and keep the vectors, check out the pattern toolkit package.

I should prefix this stating that i’m pretty new to Dynamo, so any insight would be appreciated.

I see, if I’d be able to get my image vectorized, i.e. using JPG to SVG (Online & Free) — Convertio, would there be a chance to translate this into circles?
The output I am getting from the website are a mix of circles and squares with filleted corners, not at all useful in my case.

I was thinking maybe something that works like this:

→ given the vectorized image
→ recognize black regions and find the center of each of the of the regions
→ create a point in that location
→ apply a circle to the point based on the area of that black region (given the biggest area should have a diameter of 30mm and the smallest a diameter of 1 or 2mm)
→ export to dxf or dwg

Hope I’m not asking for too much, it just seem something that could be made but I have no knowledge how to (yet)

I’d import the image into Civil 3D, trace the raster, and let Dynamo find the center/ shape of each curve.

That said I don’t think that the image you provided is sufficient for that task; regenerating the shapes with pattern toolkit might be easier.

okay so we’re on the same page i guess, i can convert the image through the website i mentioned above into a dxf, then open it in Autocad and save it as a DWG, the output is polylines so i have the same issue.
I will need all these shapes to be circles.

see this example:
Shawl_10.dwg (7.5 MB)

Looked over rebuilding the circles with pattern toolkit. Was quite quick and got some nice results, though i am not sure if this is what you’re looking for.


1 Like

the pattern is definitely not the same, as it shouldn’t be a repeating pattern, just like the original image.
Seems like you’ve been able to get the fading on the right side? i can’t see much from the preview, how did that turn out?
looks like we’re on the right path.

That was with the severely down sampled image which was posted to the forum.

The option around the image import looks like this:





Seems to work fairly well. Give it a shot and see where you get.

3 Likes

Alright this looks amazing! thank you for looking into this and spending time helping me out.

I’ll have to study this work-flow a bit to understand everything that’s going on here, and thank you for the descriptions!

I do have one last question, the dynamo I use is built-in to Revit 2022. Can this be done with this type of dynamo or do I need to download Dynamo Sandbox?

I’m not finding the note “Document.Current” to reference Autocad, it gets the current Revit model only.

This utilizes Dynamo for Civil 3d, as the data read from an import would lose the loops. Best to install that based on the scope of the data I’m already seeing. You could convert the individual curves to polycurves in Dynamo (how I believe they’d import), but there is no certainty that the graph would finish based on the scope of your task and a reasonable assumption on memory available… too many moving parts. Hopefully you can install Civil 3D 2021 or newer as that will be the fastest way. The other alternative is to look into reading the raw dxf data to see if you can get the polycurves from there… that’s a very big lift.

1 Like