Build 3D models from Eagle files

From DP

Jump to: navigation , search

3D ModelTuT2.jpg



Over the last few weeks we've been building 3D models of our projects in Google SketchUp using the EagleUp script. This script makes a 3D model of the board from Cadsoft Eagle board (.brd) files, and populates it with preexisting models of components.

Once you have a 3D model in SketchUp you are free to evaluate it, build custom enclosures around it, or interface your model with others. This tutorial will help you build 3D models of your projects.

  • Be advised that to build full 3D models of your projects you will have to have models for all your components. Some are available with the EagleUp script, some via the 3D warehouse, and some from our own library.

Download and Setup

There are a few apps you'll need for everything to function properly. Download the following:

Once you have downloaded everything, install SketchUp and ImageMagick.

  • Extract the EagleUp archive
  • Move the EagleUp_export.ulp file to the ULP folder located in the Eagle installation folder
  • Move the EagleUp_import.rb file to the Plugins folder in the Google SketchUp installation folder
  • Move the models folder anywhere you like, but remember where it is. This is where you will build your component 3D library
  • Open an Eagle board (.brd) file
  • Run EagleUp_export.ulp. A configuration GUI will appear

3D ModelTuT setupEU22.jpg

Insert the links to the respective files into the fields, use full paths and '/' as directory separators instead of '\'

  • Example of models path: C:/Users/(username)/Desktop/Models
  • Example of convert.exe path: C:/Program Files (x86)/ImageMagick-6.7.5-Q8/convert.exe
  • Example of composite.exe path: C:/Program Files (x86)/ImageMagick-6.7.5-Q8/composite.exe
TIP:Just hit set for Windows, and edit the default paths to match your own.

Hit OK.

Check that there are no beaks on the dimension Layer

3D ModelTuT DimBreak.jpg

Now open the board you want to model.

It's very important to check if the board outline defined by the Dimensions layer is broken. If you get a bunch of lines instead of a model in SketchUp it is probably due to a broken board outline.

Zoom in for a close inspection. Once you are reasonably confident that there are no breaks continue to the next step.

Export the board model from Eagle

3D ModelTuT EUExport33.jpg

Next, run the EagleUp export ULP to export the board in a format that's useful in SketchUp.

  • Open the board in Eagle that you want to model
  • Run the EagleUp_export.ulp
  • Choose your board export options
  • Hit OK.

A new folder is created in the directory where your Eagle files are. Inside you'll find lots of images of the board and an .eup file. SketchUp uses the .eup file to build the model.

Import the board model into SketchUp

3D ModelTuT SUInport.jpg

Run the import EagleUp script in SketchUp to build the model:

  • Start a new file in SketchUp
  • Choose meters as the unit
  • Make sure the new SketchUp file is empty, delete the human model
  • Start the EagleUp plug in Plugins->Import EagleUp 4.3
  • Browse to the .eup exported from Eagle

Enjoy the show, it can take a while.

Check model placement and orientation

3D ModelTuT SUModelPl.jpg

When the model has been built, a report will show components that did not have 3D models. The board and any available components will be visible. Look over the board, check the alignment and orientation of the component models.

3D ModelTuT SURot.jpg

Some part model won't be perfectly aligned with the PCB. These will need to be tweaked.

To rotate a part model:

  • Select the model you want to move with the Select tool
  • Click on the Rotate tool
  • Move your mouse over a flat part of the board or model, click on it
  • Now click anywhere you like
  • Rotate the model with movements from your mouse
  • Click the mouse button when you are satisfied with the orientation

Hint: you can also just type in the number in degrees you would like the model to rotate.

3D ModelTuT SUMOVE.jpg

To move a part model:

  • Select the model you want to move with the Select tool
  • Click on the Move tool
  • Click on the model you want to move and hit one of the keyboard arrow keys
TIP:If you remember what you had to do to adjust the part, you can save the changes for future projects. Go into the models folder and edit the component model in the exact same way. Now generate the whole board again, the component will be properly aligned.

TIP:You can also alter the footprint of the part within the Eagle library editor. This is usually useful if you have an odd-ball footprint with an origin that's different from the rest. See Eagle - Quickly Updating Footprints for more info on this.

Download or create missing part models

3D ModelTuT DW2L.jpg

One thing you'll have to do a lot is download models of your missing components or create them from scratch.

To download components hit the Get models... button in the top right corner. This opens the 3D warehouse where you can search for models. Alternately you can download the models we use from SVN.

In order for a part model to be matched automatically it must be in the Models folder, and the name must match the part in Eagle. Our part models in SVN match our Eagle part library.

If there is no model of the component you are looking for, you'll have to build one yourself. That's beyond the scope of this tutorial, but there's plenty of SketchUp info out there.

Share models

If you build a part model, please share it share it with other modelers. You can upload it to the 3D Warehouse, post it in our forums, or just share a link with us. Our parts models are available in SVN, and we're uploading them to the 3D Warehouse too.