Last active
October 13, 2018 23:46
-
-
Save ceremcem/14b3c1105a12f434b6f829fa88e23109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line = | |
is: vector | |
start: {x: 0, y: 0} | |
end: @start `plus` [1, 0] | |
rectangle = | |
public: {x, y, width, heght, center} | |
top: | |
is: line | |
start: {x, y} | |
end: {x: x + width, y} | |
right: | |
is: line | |
start: @top.end | |
end: @start `plus` [0, -height] | |
bottom: | |
is: line | |
start: right.end | |
end: | |
x: @top.start.x | |
y: my.start.y | |
left: | |
is: line | |
start: @bottom.end | |
end: @top.start | |
pad = | |
is: rectangle | |
clearance: (margin) -> | |
is: rectangle | |
width: parent.width + margin | |
height: parent.height + margin | |
square-pad = | |
is: pad | |
width: 2mm | |
height: my.width | |
clearance: 0.15mm | |
long-pad = | |
is: square-pad | |
height: 4mm | |
sot23 = | |
pad1: | |
is: square-pad # inherits the square-pad properties | |
pad2: | |
is: pad1 # inherits the pad1 properties | |
transform: | |
x: +1.9mm | |
pad3: | |
is: pad1 # inherits the pad1 properties | |
transform: | |
x: pad2.transform.x / 2 | |
y: 2.2mm | |
lm27 = | |
is: sot23 | |
ic1 = | |
is: lm27 | |
ic2 = | |
is: sot23 | |
gnd = is: meta | |
power-sch = | |
public: {gnd, out, vcc} | |
out: ic1.pad3 | |
schema: is: netlist: """ | |
1: ic1.pad1, ic2.pad2 | |
2: ic1.pad2, gnd | |
""" | |
power-pcb = is: assembly: """ | |
[.] ic1.pad3.right, ic2.pad3.left | |
ic1.top [H 5mm] ic2.bottom | |
wire1 (start) [.] ic1.pad2.center, down 5mm, | |
right 3mm, top-right =ic1.pad3.left, [.] ic2.pad3 | |
down ic5.gnd, bottom-right vertical=5mm, [.] ic3.pad1 | |
""" | |
Author
ceremcem
commented
Jan 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment