#use-added-syntax(jitx)
defpackage parametric :
import core
import collections
import math
import jitx
import jitx/commands
import ocdb/utils/defaults
import ocdb/utils/landpatterns
import ocdb/utils/symbols
import ocdb/utils/generic-components
pcb-component example-resistor :
manufacturer = "Yageo"
mpn = "RC0402FR-071KL"
description = "RES SMD 1K OHM 1% 1/16W 0402"
reference-prefix = "R"
port p : pin[[1 2]]
val sym = resistor-sym(ResistorStd)
val lp = ipc-two-pin-landpattern("0402")
symbol = sym(p[1] => sym.p[1], p[2] => sym.p[2])
landpattern = lp(p[1] => lp.p[1], p[2] => lp.p[2])
pcb-module my-design :
inst photo : example-resistor
inst r1 : chip-resistor(["resistance" => 10.0, "case" => "0201"])
inst r2 : chip-resistor(["resistance" => 10.0, "case" => "0402"])
inst r3 : chip-resistor(["resistance" => 10.0, "case" => "0603"])
inst r4 : chip-resistor(["resistance" => 10.0, "case" => "0805"])
for i in instances(self) do :
println(mpn?(i))
make-default-board(my-design, 4, Rectangle(10.0, 10.0))
view-board()
view-schematic()