Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
No results found
Select Git revision
  • master
  • patch-1
2 results
Show changes
108 files
+ 23766
183
Compare changes
  • Side-by-side
  • Inline

Files

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
**.l#*
 No newline at end of file

README.md

0 → 100644
+1 −0
Original line number Diff line number Diff line
These are historical; current library development is at https://gitlab.fabcloud.org/pub/libraries

eagle/README.md

0 → 100644
+28 −0
Original line number Diff line number Diff line
## Use Fab Design Rules in Eagle

This will help you make sure that traces are not too close together!

In this folder, find ``` fabcity-designrules.dru ```

In Eagle, in the Board Window, find ``` edit >> design rules ``` 

On the first tab, use 'load' and load this .dru file.

Now you can use the 'DRC' command to check!

## Automate the generation of trace.png and cutout.png files
Matt Keeter wrote a Python script that opens up Eagle and exports a number of pngs using ImageMagick.

To get this script to run, use the following steps:
* Save eagle_png.py into the folder where you keep your Eagle project folders containing .brd and .sch files
* Install [ImageMagick](https://www.imagemagick.org/script/index.php)
* Create a polygon over your .brd design on the Milling layer (number 46)
* Set the isolate value for the polygon to a number greater than 16, this will ensure there's enough black space for mods to generate toolpaths in (see image below)
* Save your .brd file and close Eagle
* Run eagle_png using the following command `python eagle_png.py board_folder/board_name.brd`
* The script should have saved several .png files into the folder where the .brd file is

<img src="img/isolate.png" alt="Increase isolate value for polygon" width="700"/>


> **Note:** With later versions of Eagle (9.0.1+), by default it is configured to show text similar to "1-16" ontop of each via. This comes through even when exporting your final image. To remove this artifact, type the following in the commandline: `SET Option.ViaLength 0`

eagle/eagle_png.py

0 → 100644
+185 −0
Original line number Diff line number Diff line
#!/usr/bin/env python

import os
import sys
import platform
import glob
import subprocess
import hashlib

def find_eagle():
    if platform.uname()[0] == 'Darwin':
        try:
            eagle_dir = glob.glob('/Applications/EAGLE*')[-1]
        except IndexError:
            sys.stderr.write("Error: EAGLE not found.\n")
            sys.exit(1)

        return eagle_dir + '/EAGLE.app/Contents/MacOS/EAGLE'
    else:
        if subprocess.call(['which','eagle'],
                           stdout = open(os.devnull, 'w')):
            sys.stderr.write("Error: EAGLE not found.\n")
            sys.exit(1)
        return 'eagle'

def create_images(name, resolution = 1500):
    for img in ['top','bottom','cutout','holes','vias']:
        file = '%s.%s.png' % (name, img)
        if os.path.isfile(file):
            os.remove(file)

    script = '''
ratsnest; write;
set palette black; window;
display none top vias pads;
export image '{name}.top.png' monochrome {resolution};
display none bottom vias pads;
export image '{name}.bottom.png' monochrome {resolution};
display none milling;
export image '{name}.cutout.png' monochrome {resolution};
display none holes;
export image '{name}.holes.png' monochrome {resolution};
display none vias pads;
export image '{name}.vias.png' monochrome {resolution};
quit'''.format(name = name, resolution = resolution)
    subprocess.call([find_eagle(), '-C', script, name + '.brd'])

def md5(filen