How to Make Circuit Board Outlines in Rhino (DXF)




Introduction: How to Make Circuit Board Outlines in Rhino (DXF)

About: INSTA: WEB:

With the cost of manufacturing professional circuit boards getting cheaper and cheaper, it seems like now is a great time to get into PCB design. Online communities help smooth out steep software learning curves and provide a plethora of schematics, designs and assistance for those interested getting involved. However, I feel there should be more of an emphasis on the visual forms being produced by this exciting movement. If we are going to truly utilize this massive global infrastructure, let's at least try to inspire some design dialogue!

Whether you want your board to have some more mathematically designed curves, be integrated into a 3D enclosure you've designed or just shaped be shaped like Bender from Futurama, this tutorial will help you refine the shape of your board using Autodesk Eagle and Rhino 3D Modeling Software.

Keep in mind that we will essentially be creating a Rhino to Eagle pipeline for DXF files. This means we can use dxf files for whatever element of the circuit board we want (Silkscreen, soldermask, ect!)


-PCB Software (I'm using Eagle but the basic ideas can be applied to other software)

-Rhino 3D Modeling Software

Step 1: Prep Your Design

When you've decided what you want your board to look like, it is time to get your outline prepared to be exported. It is very important that you join all broken curves to end up with one closed, continuous shape! Breaks in the shape will cause issues when importing the file into Eagle.

The Join function in Rhino is great for this. Make sure you only select the parts of your file you want as the outline!

Step 2: Export

Before you export make sure you have your shape near the origin of the eagle file. This will be used as a reference when importing into Eagle. In addition, if you want to add more dxf files in relation to this one later on, it helps to keep everything in the same place in Rhino. Also make sure your file's units are either Inches or Millimeters. If the Rhino file is not, you should convert your file to one of these two (this can be done in "Preferences" under "File")

Select only the shape you want as your outline. Then go to "File" -> "Export Selected" and when the prompt for exporting comes up select the filetype: "AutoCAD Drawing Exchange (*.dxf)"

Choose where you want to export to, name your file and then click "Save"

This will prompt another window "DWG/DXF Export Options". This window is where you select what renderer you want to use for your DXF file.

When I first started going from Rhino to Eagle I played around with this step the most to get the right style of rendering. The main difference in the export engines has to do with the way you've drawn your shapes. If you are using all straight lines that connect together, you are going to want to use one of the engines that end with the word "Line". For complex curves like in my example board, I usually use "R12 Natural" or create a custom scheme based on this one to get things just right. Playing around with this step will help with large files or very complex ones.

Step 3: Alternative Export If You Have Trouble Exporting Curves

If you have trouble importing your dxf into Eagle or if you get strange artifacts where some of your lines are mirrored and disconnected or something odd like that, it might be better to convert your shape into a cluster of lines. Lines are really easy for Eagle to render so this can also help if your outline is slowing down your software.

In order to do this, select your shape and go to "Curve" -> "Convert" -> "Curves to Line"

This will prompt you to input some info for the settings. I usually have my settings as follows:

"Output=Lines SimplifyInput=No DeleteInput=No AngleTolerance=5 Tolerance=0.01 MinLength=0 MaxLength=0 OutputLayer=Current"

Keep in mind that these settings will create the new shape on top of the existing shape and on the same layer. This function is another good place to experiment with. Changing things like the MinLength and MaxLength will add constraints on what type of lines you get. Alternatively, adjusting the AngelTolerance and Tolerance will change how close to the original shape your new shape is.

In the last photo I have moved the line shape bellow the original shape so you can see the difference (notice the point structure is different but the shape generally looks the same).

When exporting this shape, follow the same steps as before but this time select one of the DXF Schemes that ends in the word Line. I usually use "2007 Lines"

Step 4: Import to Eagle

Now that we have the have our DXF file, lets import it into Rhino.

Open the ".brd" file you will be working with and go to "File" -> "Import" -> "DXF..."

This will prompt the window: "Eagle: DXFIMPORT - 2.0"

This window lets us tell Eagle which file we want to use and a little info on the file itself.

First, we need to select our file. Click on the "Browse" button and navigate to the DXF file you want to use.

Second, we need to tell Eagle which layer we want this file imported to. Because we want this dxf file to be our outline, we are going to select layer 20: "20 Dimension".

Next, we tell Eagle what unit our file is in (either Imperial (in) or Metric (mm) ). This is determined by the units your Rhino file is in. If you are not sure what your units are, go back into your Rhino file and check. If the units are something other than Inches or Millimeters, you should convert you Rhino file into one of these units and re- export your dxf file.

Lastly, we tell Eagle how we want it to render our dxf. Xorg and Yorg should be 0. Width is just how thick we want our lines rendered (this doesn't really matter for outlines so I usually go with 0.2) and then scale is if we wanted to change the overall scale of the drawing (if you want the same scale as the Rhino file, leave this at 1).

After this is all set, click "OK". After a second, another window will pop up asking you if Eagle can run the script. Click "Run", sit back and let the software scribble away. Depending on how complex your file is, this could take a few minutes.

Step 5: How to Tell If Your Outline Is a Closed Shape

Once Eagle has finished getting your file imported, you should be able to tell if everything is connected by the color of your board. Notice how in the first photo, the inside of our board is a darker color than the rest of the screen. This is Eagle letting us know that the board outline is a closed shape. Notice in the second photo how everything is the same color. This is because our outline not a closed shape (it is missing a connection on the right). Having everything be the same color means there is either something wrong with how we exported our file or with the drawing itself. If this happens, go back into your Rhino file and check that your shape is closed and that all your settings are correct when exporting your DXF.

Step 6: Keep Going!

You now have complex shapes being rendered in you Eagle files! What will you do next? Keep in mind that these files can be imported on any layer you choose! Import them to layer 21 (tplace) to add some flare to your silkscreen layer! Import a shape to layer 1 (top) and again on layer 29 (tstop) for some exposed coper drawings (maybe make a touchpad in the shape of your friends face?)

PCB Challenge

Second Prize in the
PCB Challenge

Be the First to Share


    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Microcontroller Contest

      Microcontroller Contest



    4 weeks ago

    Great tips and beautiful work :D