A few days ago I made a low-profile fan for my window out of computer fans. I wanted to mount the fans in a laser-cut frame, so I started by taking measurements and drafting the design in SolidWorks.
Often, when I make a design in SolidWorks, I include a file for storing global variables for my project. I liken this to defining global variables or constants at the beginning of a software project. I use this technique frequently to great utility in SolidWorks, but I don’t see very many colleagues use it, so let me elaborate on it.
First, I make a text file called “dimensions.txt” or similar, and, in it, I list all the global variables I’d like to use in my project, like the example below. These include values that I’d like to be the same across parts files. I also include values that I think will have to be changed by the end of the project.
For example, for this project, I thought I might change what computer fan I used and how many I used, so I included mounting dimensions for the fan as well as the quantity of fans.
However, I knew the width of the window wouldn’t change, and was only used in one or two parts, so I didn’t include that constant in my list of project-wide constants.
"dimensions.txt" 1 "depth" = 0.98 2 "side" = 2.36 3 "hole spacing" = 1.97 'horizontal or vertical distance between two holes 4 "fan diameter" = 2.52 5 "fan count" = 6 6
There are some tricks to this text file–for SolidWorks to understand it, all variables must be enclosed in quotes ( ” ” ), comments must be preceded by a single quote ( ‘ ), and the file must end with a newline. Note that in the box above, the numbers on the left mark the lines but are not in the actual text file.
I save dimensions.txt in the root directory of my SolidWorks project. Then, whenever I make a new part, I first use the Equations dialogue in SolidWorks to import this file into the list of parameters for that part; the screenshot below shows the Equations dialogue after importing dimensions.txt. For a parametric modeling software, I think SW sure has this parameter dialogue tucked away, so I have it hotkeyed to Q, the same as the default in Autodesk Inventor, if I recall correctly.
Then, whenever I dimension a sketch or feature in the part, I link those values to the global variables imported in dimensions.txt, as shown below.
This allows me to change parameters after I’ve finished the basic CAD. Whenever the part or assembly is rebuilt, SolidWorks automatically refreshes the values in dimensions.txt. Consequently, I can change one value with my text editor, rebuild the top-level assembly in SolidWorks (ctrl+b), and all files update their parameters from dimensions.txt.
This actually ended up being relevant for this project because I found an extra fan of the same size as my earlier ones, and I wanted to add it to the array. Due to this technique, this change required an order of magnitude fewer operations–my panel and assembly were updated immediately and automatically, as demonstrated below.
Anyway, after I made this design, I laser cut the front panel.
Then, I screwed it all together and ran it off of a 5V couple-Amp power supply.
Oh, FWIW, I just noticed some of the SolidWorks sheet metal features, which could be relevant for fan mounts like this. link: http://help.solidworks.com/2012/English/solidworks/sldworks/hidd_dve_vent.htm
How long did it take the laser cutter to cut out that assembly??
Certainly it took no more than 5 minutes. I forget the exact settings I used, but it was 1/4″ plywood on a 30W laser.
Pingback: Playing with Blocks, Now with More Robots! | Steven's Logbook