Mail Archives: geda-user/2015/01/05/19:50:58
Hi All,
I'm doing some re-factoring of HID drawing APIs etc.., and HIDs /
exporters not currently merged to git HEAD will likely need some
alterations to keep them working.
The changes are intended to help facilitate code re-use between HIDs,
and greater flexibility for HIDs / GUIs needing to do something
different with the PCB data.
Various changes in my PCB+GL branches require altering / augmenting or
even replacing PCB's core rendering code, and I'm working towards
re-factoring things in a way to allow variations in rendering needs to
be accommodated without a complete copy+paste replacement of draw.c (as
some of my branches currently rely upon). Such changes also have the
potential to simplify exporter HIDs in many cases.
Regarding duplication, I count at least 3 HIDs which use libgd in pretty
similar ways, we have 3x HIDs that export postscript (and eps). These
are not an immediate target of my efforts, but I expect we can
eventually reduce some duplication here.
There are potentially 2 (or more if anyone writes a native OSX or Win32
GUI) GUIs that could utilise the OpenGL rendering code, and shared cairo
code could provide means to render a number of other different file
formats. (Admittedly we already render to may of the most interesting
ones).
If anyone knows of an exporter not in git HEAD, which may require
special consideration as to its needs (API wise), please let me know.
Areas where the current draw.c enforced ordering of HID / HID_DRAW API
calls cause unnecessary problems are of particular interest.
If there are a some exporters people want to maintain (or get merged at
some point?), also let me know, and I'll take a look at whether I can
branch a copy locally here, and keep it updated as I slowly re-factor.
I'm not keen on merging any 3D stuff just yet (not mine, nor any of the
OpenSCAD exporters), as I'd like to have a solid handle on our data
definitions (file format extensions required) first. I'm hoping to
discuss this with folks at FOSDEM.
(PS.. If anyone wants the core of a common cairo drawing HID, I wrote
that last weekend whilst toying with API changes)... My intended purpose
was to eventually experiment with using cairo to overlay grab handles
and outlines onto object rendered with OpenGL.
The first pile of API refactor I'm testing is here:
http://www.repo.or.cz/w/geda-pcb/pcjc2.git/shortlog/refs/heads/api_refactor
Regards,
--
Peter Clifton <peter DOT clifton AT clifton-electronics DOT co DOT uk>
Clifton Electronics
- Raw text -