MCPcopy Create free account
hub / github.com/Robotips/uConfig / writePin

Method writePin

src/kicad/parser/kicadlibparser.cpp:200–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void KicadLibParser::writePin(Pin *pin)
201{
202 // http://en.wikibooks.org/wiki/Kicad/file_formats#X_record_.28Pin.29
203
204 // X PIN_NAME PAD_NAME X_POS Y_POS LINE_WIDTH DIRECTION NAME_TEXT_SIZE
205 // LABEL_TEXT_SIZE LAYER ?1? ELECTRICAL_TYPE
206 _stream << "X ";
207 if (pin->name().isEmpty())
208 _stream << "~";
209 else
210 _stream << pin->name();
211 _stream << " "
212 << pin->padName() << " " // pad name
213 << pin->pos().x() << " " << -pin->pos().y() << " " // x y position
214 << pin->length() << " " // lenght
215 << pin->directionString() << " " // pin direction (up/down/left/right)
216 << "50" << " " // name text size
217 << "50" << " " // pad name text size
218 << pin->layer() << " "
219 << "1" << " "
220 << pin->electricalTypeString();
221 if (pin->pinType() != Pin::Normal)
222 _stream << " " << pin->pinTypeString();
223}
224
225void KicadLibParser::writeDraw(Draw *draw)
226{

Callers

nothing calls this directly

Calls 9

padNameMethod · 0.80
directionStringMethod · 0.80
layerMethod · 0.80
electricalTypeStringMethod · 0.80
pinTypeStringMethod · 0.80
nameMethod · 0.45
posMethod · 0.45
lengthMethod · 0.45
pinTypeMethod · 0.45

Tested by

no test coverage detected