Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Convert 2D pattern in Excel to a 3D CAD model in Fusion 360

Anonymous

Convert 2D pattern in Excel to a 3D CAD model in Fusion 360

Anonymous
Not applicable

I have a 2D pattern of square elements that are either open or opaque. My goal is to create 3D CAD models from the 2D patterns. The thickness of the structures is constant but the 2d pattern will change. I have attached an example 2D pattern. My hope is that I can automate the process, where given a 2D pattern from Excel I can easily generate the 3D CAD model. The black square elements in the image represent rectangular prisms in 3D while the white elements represent square holes in the structure.  I am new to Fusion 360.

 

sheyoreomovie_0-1636836631288.png

 

0 Likes
Reply
Accepted solutions (1)
487 Views
4 Replies
Replies (4)

BrianEkins
Mentor
Mentor

This is certainly possible to automate and there are many different approaches that can be taken.  Which one will depend on what you need as the final result, how efficient you want to be, and how easy you want the code.

 

The biggest question in my mind is if the final result should consist of a bunch of small cubes (the black areas in your example) or should it be several shapes that are the result of the black cubes being combined into bigger shapes.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

Anonymous
Not applicable

Thanks for the response.

I would prefer a code that is easy to implement.

Also, I'm assuming one can join the a bunch of small cubes into a single shape. If that's the case, then whichever is more efficient to code between the unit square elements and shapes as is, will be the way to go.

0 Likes

BrianEkins
Mentor
Mentor
Accepted solution

It was an interesting problem and I was able to come up with something quickly.  Attached are the files.

 

PatternTest.f3d is the initial Fusion file that contains the blocks, where all of them are currently turned on.  There are some user parameters in the file that will let you control the size of the blocks and how many are in each row and column.

 

PatternTest.csv is a sample file that I used to test with.  CSV is a much simpler format to work with than XLS and you can save an XLS as csv.

 

The ProcessPattern.zip file contains the program.  Unzip it anywhere on your system and then use the green "+" symbol at the top of the "Scripts and Add-Ins" dialog to add it to the list of known scripts.

 

To run it, have the PatternTest.f3d file open and then run the script. It will prompt you to select the csv file and then it will process. For the sample csv I get the results shown below.

PatternResults.png

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

Anonymous
Not applicable

Thanks a lot Brian. This is exactly what I needed.

Very much appreciated 

0 Likes