← Back to team overview

kicad-developers team mailing list archive

Re: future of bitmap2component?

 

Very interesting, thank you JP. The Pcbnew file format only supports the
second representation (main outline with all its holes connected to the
main outline), correct?

-Matthew

On Fri, Jul 10, 2015 at 1:05 PM, jp charras <jp.charras@xxxxxxxxxx> wrote:

> Le 10/07/2015 19:17, Matthew Beckler a écrit :
> > I have some python code to convert an SVG image to a Kicad pcb module
> > silkscreen, however it doesn't work great for polygons that contain
> cutouts
> > (such as the holes in the characters A, B, Q, etc). It seems like pcbnew
> > does not support having cutouts inside a filled region. I've noticed that
> > bitmap2component works around this by creating infinitely-thin
> connections
> > from a polygon's outside edge to each of the cutouts, effectively
> > connecting each cutout with the exterior.
> >
> > The code isn't great, but here's what I've got so far. It's based on the
> > Egg-Bot code (used for driving a two-axis plotter based on SVG files),
> and
> > I need to figure out what sort of licensing is needed for it based on all
> > the library files used.
> > https://github.com/wayneandlayne/svg2kicadmod
> >
> > Right now you need to pick the desired width and/or height in mm when you
> > run the script, so if you need different sizes of your logo then you need
> > to create several .kicad_mod files. Eventually it would be really great
> to
> > have support for changing the scaling of the rasterized logo right within
> > pcbnew, so I perhaps having a python plugin for fancy SVG-based board
> > graphics would be neat.
> >
> > -Matthew Beckler
> > Co-founder and Engineer
> > W&L
> >
>
> Generally speaking, about polygons with holes, there are 2 dual
> representations, and they are both used in Kicad:
>
> - The first is (obviously) "polygon with holes", which handles a set of
> polygons: the main outline and its holes.
> It is very useful to edit a complex polygon shape, but not usable to
> draw/plot it.
>
> - The second is to use only one polygon which is the main outline with
> all its holes "connected" to the main outline by overlapping segments
> (what you are calling "infinitely-thin connections").
> It is very useful to draw/plot a complex polygon shape, but not very
> usable to edit it.
>
> When you want to handle complex polygons, many times you have to change
> the polygon description from the first to the second, and from the
> second to the first representation.
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References