mirror of
https://github.com/telavivmakers/at-tami.git
synced 2024-05-25 11:56:54 +03:00
21 lines
501 B
Python
21 lines
501 B
Python
#!/usr/bin/env python
|
|
"""
|
|
Various utility functions
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
This program is licensed under the GNU General Public License (GPL)
|
|
Version 3. See http://www.fsf.org for details of the license.
|
|
|
|
Rugged Circuits LLC
|
|
http://ruggedcircuits.com/gerbmerge
|
|
"""
|
|
|
|
def in2gerb(value):
|
|
"""Convert inches to 2.5 Gerber units"""
|
|
return int(round(value*1e5))
|
|
|
|
def gerb2in(value):
|
|
"""Convert 2.5 Gerber units to inches"""
|
|
return float(value)*1e-5
|