proc SCHEMATIC_electrical_transformer {} {
make input -name in -origin {340 140}
make input -name ref_in -origin {340 210}
make output -name out -origin {470 140}
make output -name ref_out -origin {470 210}
}

proc ICON_electrical_transformer args {
  icon_setup $args {{origin {0 0}} {orient R0} {name T} {n 1.0}}
icon_term -type input -origin {-60 -40} -name in
icon_term -type input -origin {-60 40} -name ref_in
icon_term -type output -origin {70 -40} -name out
icon_term -type output -origin {70 40} -name ref_out
icon_property -origin {-20 -60} -label {$name}
  icon_property -origin {-90 120} -type user -name name -default T
  icon_property -origin {-90 140} -type user -name n -default 1.0
  icon_arc 20 -20 40 0 -start 268 -extent -171
  icon_arc 20 -10 40 0 -start 102 -extent -193
  icon_arc 20 -10 40 10 -start 268 -extent -171
  icon_arc 20 0 40 10 -start 102 -extent -193
  icon_arc 20 0 40 20 -start 268 -extent -171
  icon_arc 20 10 40 20 -start 102 -extent -193
  icon_arc 20 10 40 30 -start 268 -extent -171
  icon_line 30 40 30 30
  icon_line 30 -40 30 -30
  icon_arc 20 -30 40 -10 -start 268 -extent -175
  icon_arc 20 -20 40 -10 -start 102 -extent -193
  icon_arc -30 -20 -10 0 -start 272 -extent 171
  icon_arc -30 -10 -10 0 -start 78 -extent 193
  icon_arc -30 -10 -10 10 -start 272 -extent 171
  icon_arc -30 0 -10 10 -start 78 -extent 193
  icon_arc -30 0 -10 20 -start 272 -extent 171
  icon_arc -30 10 -10 20 -start 78 -extent 193
  icon_arc -30 10 -10 30 -start 272 -extent 171
  icon_line -20 40 -20 30
  icon_line -20 -40 -20 -30
  icon_arc -30 -30 -10 -10 -start 272 -extent 175
  icon_arc -30 -20 -10 -10 -start 78 -extent 193
  icon_line -20 -40 -60 -40
  icon_line -20 40 -60 40
  icon_line 70 -40 30 -40
  icon_line 70 40 30 40
  icon_arc -10 -50 0 -40 -start 286 -extent 344
  icon_arc 10 -50 20 -40 -start 286 -extent 344
icon_property -origin {-10 50} -label {1:$n}
  icon_line 0 -30 0 30
  icon_line 10 -30 10 30
}

