Open abetusk opened 9 years ago
priority: medium estimate: 10
Hi, probably it is too late, but I have viewee project which can convert some pcb formats into readable structure. Currently I'm in process of refactoring it, adding tests and parsing additional pcb formats. Project repository.
This issue wasn't very well documented but the intent was to convert Eagle/KiCAD into a format that MeowCAD would accept. MeowCAD has a JSON format derived from the (old) KiCAD representation for components schematics and footprints for PCBs.
The conversion from Eagle or KiCAD to a format that MeowCAD would accept would require this conversion to JSON.
Can you discuss how viewee could be used to do this conversion or how viewee fits in?
Yes, sure, we can discuss. Viewee internal representation of board data is quite simple:
var boardData = {
// copper wires etc...
signals: {
'<signal-name>': {
wires: [],
vias: [],
polys: [],
texts: [],
}
},
// all non-copper things in silkscreen or outline or docs
plain: {
wires: [],
texts: [],
holes: [],
polys: []
},
// component instances, such as R15 of 0603
elements: {
'element-id': {
// for inline packages like kicad or easyeda
pkg: {
smds: [],
wires: [],
texts: [],
pads: [],
polys: [],
holes: []
},
// for referenced packages like eagle
pkg: '0603'
}
},
// packages by name for referencing from elements
packagesByName: {
'0603': {
smds: [],
wires: [],
texts: [],
pads: [],
polys: [],
holes: []
}
}
}
Rendering is little complicated because viewee supports canvas and svg, backed by base renderer. Drawing primitives contains coordinates, rotation, width and some other parameters (for example).
I'm not sure Eagle2Kicad has board conversions, so that might need to be extended.