abetusk / www.meowcad.com

website for www.meowcad.com
GNU Affero General Public License v3.0
46 stars 8 forks source link

Import KiCAD/Eagle schematics/boards #14

Open abetusk opened 9 years ago

abetusk commented 9 years ago

I'm not sure Eagle2Kicad has board conversions, so that might need to be extended.

priority:low estimate:10

abetusk commented 9 years ago

priority: medium estimate: 10

apla commented 6 years ago

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.

abetusk commented 6 years ago

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?

apla commented 6 years ago

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).