kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #02759
Re: Import png, jpeg or svg or dxf ?
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"cfdev@..." <cfdev@...>
-
Date:
Thu, 18 Jun 2009 07:05:06 -0000
-
In-reply-to:
<alpine.SOC.1.99.0906172119480.2570@...>
-
User-agent:
eGroups-EW/0.82
--- In kicad-devel@xxxxxxxxxxxxxxx, Vesa Solonen <vsolonen@...> wrote:
>
> On Wed, 17 Jun 2009, Dick Hollenbeck wrote:
>
> > Vesa,
> >
> > This is a good idea. SVG is simply XML, so a person can use libxml2,
> > which is standard on most linux systems. A person can read the whole
> > file into a DOM tree in about 5 lines of code. Then you simply have to
> > walk the tree, and generate PCBNEW graphic constructs from them.
> > However, I do not believe that PCBNEW's graphic constructs, nor graphics
> > environment, are currently general or rich enough to support anywhere
> > near 30% of what you might find in the SVG spec.
>
> Nice to see that you agree on the idea. I think I ended up to libxml2 too,
> but just had to push more through learning aside. It seems there is just
> too much to learn sometimes. I'd like to add some recursion from few
> months ago here, which deals with SVG somewhat:
>
> http://tech.groups.yahoo.com/group/kicad-devel/message/2215
>
> As stated before I think that 30% of svg spec would be just fine for
> start. It would allow quite usable, but nowhere official SVG support.
>
> > However, were we to switch over to wxGraphicsContext first, then I think
> > adding SVG support could actually lead to something worthwhile. In
> > fact, one might argue that if we were to switch to wxGraphicsContext,
> > that as we do so, we re-invent our graphic primitives to match those
> > found typically in an SVG file, FIRST. Then add the domain specific
> > attributes to those graphic primitives, such as netcode, etc. This is
> > near full rewrite of PCBNEW now. But it would be like building a car
> > standing next to a junk yard. It can go pretty quick when you have all
> > the parts. The trick I think is build it from the ground up. (Don't
> > try and *swap* out a fender or bumper at a time.)
>
> Now that's what I'd like to see too! Ultimately. But I'm comfortable with
> something less than perfect too. Heck, your junk yard example is almost
> too close explanation about my work... One ends stocking quite a load of
> this and that before everything is ready, and sometimes I choose to cheat
> on few items and just order the stuff ;)
>
> Btw, should Kicad apply for linuxfung.org to buy more hacking manpower?
>
> -Vesa
>
ok for the svg but there is a tinyXML parser too, he is very very simple touse.
http://www.grinninglizard.com/tinyxml/
And for the dxf format there is libdime at
http://www.coin3d.org/lib/dime
++
Follow ups
References