Re: gEDA-user: DRC-GUI

2009-04-07 Thread Mark
On Sun April 5 2009 05:34:44 pm Peter Clifton wrote:
> On Sun, 2009-04-05 at 16:49 -0400, Mark wrote:
> > Now I have a working DRC-GUI using master from the repo but it still
> > causes PCB to crash when I use the settings for Thin Draw or Thin Draw
> > Poly.
> >
> > Hopefully that will help to narrow down the problem.
>
> Yes, that was the ticket to narrow it down. I've only just got chance to
> look at it in detail anyway. The problem was that the DRC window doesn't
> set up a clipping region before drawing. I've added add a simple test
> allowing a NULL region to be passed to a polygon routine, and will
> investigate setting up a proper clipping region to help speed up
> drawing. (I'm fairly surprised it wasn't doing that already).

True, clipping and culling makes 3D usable.  These are just PC's after all.  

> Thanks for the help debugging the issue.

My pleasure, just one step closer to getting the GL branch released. :)

-Mark S.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-05 Thread Peter Clifton
On Sun, 2009-04-05 at 16:49 -0400, Mark wrote:
> On Sat April 4 2009 12:31:18 pm Peter Clifton wrote:
> > Could you search through src/hid/gtk/gui-drc-window.c around lines 652,
> > 655, 670 and 673, to see what the effect of changing "font_size" to
> > simply "size" is?
> 
> I just got the latest from Tracking The Latest over at 
> http://pcb.gpleda.org/obtaining.html and tested out the new DRC-GUI to 
> compare it with the GL branch.  I was getting the same font errors Bert got 
> so I made the changes above which worked well.

Now committed.

> Now I have a working DRC-GUI using master from the repo but it still causes 
> PCB to crash when I use the settings for Thin Draw or Thin Draw Poly.
> 
> Hopefully that will help to narrow down the problem.

Yes, that was the ticket to narrow it down. I've only just got chance to
look at it in detail anyway. The problem was that the DRC window doesn't
set up a clipping region before drawing. I've added add a simple test
allowing a NULL region to be passed to a polygon routine, and will
investigate setting up a proper clipping region to help speed up
drawing. (I'm fairly surprised it wasn't doing that already).

Thanks for the help debugging the issue.

Best regards,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-05 Thread Mark
On Sat April 4 2009 12:31:18 pm Peter Clifton wrote:
> Could you search through src/hid/gtk/gui-drc-window.c around lines 652,
> 655, 670 and 673, to see what the effect of changing "font_size" to
> simply "size" is?

I just got the latest from Tracking The Latest over at 
http://pcb.gpleda.org/obtaining.html and tested out the new DRC-GUI to 
compare it with the GL branch.  I was getting the same font errors Bert got 
so I made the changes above which worked well.

Now I have a working DRC-GUI using master from the repo but it still causes 
PCB to crash when I use the settings for Thin Draw or Thin Draw Poly.

Hopefully that will help to narrow down the problem.

-Mark


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-04 Thread Bert Timmerman
Hi Peter,

On Sat, 2009-04-04 at 17:31 +0100, Peter Clifton wrote:
> On Sat, 2009-04-04 at 17:12 +0200, Bert Timmerman wrote:
> 
> > Got the pcb git repository updated and build done.
> > 
> > DRC dialog window shows upon checking DRC and reports 24 violations on
> > the example/LED2 board.
> 
> (Oops!)
> 

Is 24 violations saying something about the example board or something
about the thorough DRC checking ?

> > I get the following warnings all the time (I guess about 24 times on
> > each redraw of the DRC dialog window) on the console I started pcb from.
> > 
> > 
> > 
> > (pcb:23590): Gtk-WARNING **: Failed to set cell text from markup due to
> > error parsing markup: Attribute 'font_size' is not allowed on the 
> > tag on line 2 char 25
> > 
> > 
> 
> Hmm, what version of Pango do you have?
> 
> Could you search through src/hid/gtk/gui-drc-window.c around lines 652,
> 655, 670 and 673, to see what the effect of changing "font_size" to
> simply "size" is?
> 

Removing the "font_" part in the string (4 times) did the trick as can
be seen at:

http://www.xs4all.nl/~ljh4timm/downloads/20090404_DRC%20dialog%
20window-2.png

> (Or removing the attribute all together). They are just formatting
> kludges which are used to get a small line spacing between the various
> portions of the rendered message.
> 
> > The first time the DRC dialog window opens it had the size of a postage
> > stamp, on subsequent sessions it opened full screen.
> 
> Ah, I didn't give it a default size. It is probably reading incorrect
> size data from a non existent preferences file. Thanks for the catch.
> 
> It shouldn't open full screen unless that is the size you had it the
> last time. It is supposed to remember size across invocations and PCB
> restarts. (Code copied from the log window).
> 
> > Resizing the DRC dialog window works as expected.
> > 
> > On the screen shot you can seen that there appears no textual
> > information stating the nature of the violation.
> > 
> > http://www.xs4all.nl/~ljh4timm/downloads/20090404_DRC%20dialog%
> > 20window-1.png
> 
> If fixing the pango markup makes the warning go away, I expect your text
> will also appear.
> 
> > Hope this all helps a bit.
> 
> Thanks for the reports.. it is great to see people are testing the new
> features, and helping to iron out all the kinks.
> 

No, problem, thanks for improving an already good tool to an even higher
level of usability.

> Best regards,
> 

Kind regards,

Bert Timmerman.



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-04 Thread Peter Clifton
On Sat, 2009-04-04 at 17:12 +0200, Bert Timmerman wrote:

> Got the pcb git repository updated and build done.
> 
> DRC dialog window shows upon checking DRC and reports 24 violations on
> the example/LED2 board.

(Oops!)

> I get the following warnings all the time (I guess about 24 times on
> each redraw of the DRC dialog window) on the console I started pcb from.
> 
> 
> 
> (pcb:23590): Gtk-WARNING **: Failed to set cell text from markup due to
> error parsing markup: Attribute 'font_size' is not allowed on the 
> tag on line 2 char 25
> 
> 

Hmm, what version of Pango do you have?

Could you search through src/hid/gtk/gui-drc-window.c around lines 652,
655, 670 and 673, to see what the effect of changing "font_size" to
simply "size" is?

(Or removing the attribute all together). They are just formatting
kludges which are used to get a small line spacing between the various
portions of the rendered message.

> The first time the DRC dialog window opens it had the size of a postage
> stamp, on subsequent sessions it opened full screen.

Ah, I didn't give it a default size. It is probably reading incorrect
size data from a non existent preferences file. Thanks for the catch.

It shouldn't open full screen unless that is the size you had it the
last time. It is supposed to remember size across invocations and PCB
restarts. (Code copied from the log window).

> Resizing the DRC dialog window works as expected.
> 
> On the screen shot you can seen that there appears no textual
> information stating the nature of the violation.
> 
> http://www.xs4all.nl/~ljh4timm/downloads/20090404_DRC%20dialog%
> 20window-1.png

If fixing the pango markup makes the warning go away, I expect your text
will also appear.

> Hope this all helps a bit.

Thanks for the reports.. it is great to see people are testing the new
features, and helping to iron out all the kinks.

Best regards,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-04 Thread Bert Timmerman
Hi Peter,

On Sat, 2009-04-04 at 11:34 +0100, Peter Clifton wrote:
> On Fri, 2009-04-03 at 17:38 -0400, Mark wrote:
> > On Thu April 2 2009 11:11:01 pm Peter Clifton wrote:
> > > On Thu, 2009-04-02 at 20:23 -0400, Mark wrote:
> > > > I checked out the latest from git and ran the Design Rule Checker many
> > > > times. It keeps crashing PCB.  It did work once right after I turned off
> > > > Thin Draw Poly but has crashed every time since.  After running it
> > > > through gdb it looks like it is sending PolygonHoles() a null for the
> > > > "range" value.
> > > >
> > > > I've attached the debug.  Let me know if you want the layout.
> > >
> > > Hmm, GL version, or non-GL version?
> > 
> > GL version.  I pulled it twice last night because I saw the time stamp on 
> > your 
> > post was later than my first git-clone.
> > 
> > > If you have a minimal layout to reproduce, that would be excellent, as
> > 
> > A minimal layout would be nonsensical as it crashes even when it is just a 
> > single line.
> > 
> > > I've not seen any crash like that myself. I've been testing on boards
> > > with polygons (including holes), but never saw it crash).
> > 
> > It sounds like it might just be on my system, then.  
> > 
> > > I had better try to get to the bottom of this ASAP,
> > 
> > Would having a login account on my system help you?
> > 
> > > I just pushed the code into the master repository!.
> > 
> > The GL code too?
> 
> No, just GDK drawing in the master repository. The necessary changes to
> make it work with GL are now rolled into the GL swithover patch.
> 
> If you're getting crashes on a single line, I suspect the problem may be
> related to some GL setup / teardown which isn't working right to setup
> the off-screen drawing areas. With this in mind, I'll give it a try on
> my other machine next week (with NVidia graphics).
> 
> I'm not sure an account would help, since I'd imagine it would need to
> be accessing the graphics card as usual. Remote login would change the
> test. Thanks for the offer though.. I'll let you know if it looks like
> it would be useful at any point.
> 

Got the pcb git repository updated and build done.

DRC dialog window shows upon checking DRC and reports 24 violations on
the example/LED2 board.

I get the following warnings all the time (I guess about 24 times on
each redraw of the DRC dialog window) on the console I started pcb from.



(pcb:23590): Gtk-WARNING **: Failed to set cell text from markup due to
error parsing markup: Attribute 'font_size' is not allowed on the 
tag on line 2 char 25



The first time the DRC dialog window opens it had the size of a postage
stamp, on subsequent sessions it opened full screen.

Resizing the DRC dialog window works as expected.

On the screen shot you can seen that there appears no textual
information stating the nature of the violation.

http://www.xs4all.nl/~ljh4timm/downloads/20090404_DRC%20dialog%
20window-1.png

Hope this all helps a bit.

Keep up the Good Work (TM).

Kind regards,

bert Timmerman.



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-04 Thread Peter Clifton
On Fri, 2009-04-03 at 17:38 -0400, Mark wrote:
> On Thu April 2 2009 11:11:01 pm Peter Clifton wrote:
> > On Thu, 2009-04-02 at 20:23 -0400, Mark wrote:
> > > I checked out the latest from git and ran the Design Rule Checker many
> > > times. It keeps crashing PCB.  It did work once right after I turned off
> > > Thin Draw Poly but has crashed every time since.  After running it
> > > through gdb it looks like it is sending PolygonHoles() a null for the
> > > "range" value.
> > >
> > > I've attached the debug.  Let me know if you want the layout.
> >
> > Hmm, GL version, or non-GL version?
> 
> GL version.  I pulled it twice last night because I saw the time stamp on 
> your 
> post was later than my first git-clone.
> 
> > If you have a minimal layout to reproduce, that would be excellent, as
> 
> A minimal layout would be nonsensical as it crashes even when it is just a 
> single line.
> 
> > I've not seen any crash like that myself. I've been testing on boards
> > with polygons (including holes), but never saw it crash).
> 
> It sounds like it might just be on my system, then.  
> 
> > I had better try to get to the bottom of this ASAP,
> 
> Would having a login account on my system help you?
> 
> > I just pushed the code into the master repository!.
> 
> The GL code too?

No, just GDK drawing in the master repository. The necessary changes to
make it work with GL are now rolled into the GL swithover patch.

If you're getting crashes on a single line, I suspect the problem may be
related to some GL setup / teardown which isn't working right to setup
the off-screen drawing areas. With this in mind, I'll give it a try on
my other machine next week (with NVidia graphics).

I'm not sure an account would help, since I'd imagine it would need to
be accessing the graphics card as usual. Remote login would change the
test. Thanks for the offer though.. I'll let you know if it looks like
it would be useful at any point.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-03 Thread Mark
On Thu April 2 2009 11:11:01 pm Peter Clifton wrote:
> On Thu, 2009-04-02 at 20:23 -0400, Mark wrote:
> > I checked out the latest from git and ran the Design Rule Checker many
> > times. It keeps crashing PCB.  It did work once right after I turned off
> > Thin Draw Poly but has crashed every time since.  After running it
> > through gdb it looks like it is sending PolygonHoles() a null for the
> > "range" value.
> >
> > I've attached the debug.  Let me know if you want the layout.
>
> Hmm, GL version, or non-GL version?

GL version.  I pulled it twice last night because I saw the time stamp on your 
post was later than my first git-clone.

> If you have a minimal layout to reproduce, that would be excellent, as

A minimal layout would be nonsensical as it crashes even when it is just a 
single line.

> I've not seen any crash like that myself. I've been testing on boards
> with polygons (including holes), but never saw it crash).

It sounds like it might just be on my system, then.  

> I had better try to get to the bottom of this ASAP,

Would having a login account on my system help you?

> I just pushed the code into the master repository!.

The GL code too?

-Mark



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Peter Clifton
On Thu, 2009-04-02 at 20:23 -0400, Mark wrote:
> On Thursday 02 April 2009 03:38:07 pm Peter Clifton wrote:
> > Ok, if you have my repository checked out, it is the "better_drc_nogl"
> > branch. (It was dead easy to make the graphic previews work in the non
> > GL branch.).
> >
> > The GL version is now rebased on top of that, and the appropriate canges
> > rolled into the rest of the GL updates, so you want the "before_pours"
> > branch as usual.
> 
> 
> Peter,
> 
> I checked out the latest from git and ran the Design Rule Checker many times. 
>  
> It keeps crashing PCB.  It did work once right after I turned off Thin Draw 
> Poly but has crashed every time since.  After running it through gdb it looks 
> like it is sending PolygonHoles() a null for the "range" value.
> 
> I've attached the debug.  Let me know if you want the layout.

Hmm, GL version, or non-GL version?

If you have a minimal layout to reproduce, that would be excellent, as
I've not seen any crash like that myself. I've been testing on boards
with polygons (including holes), but never saw it crash).

I had better try to get to the bottom of this ASAP, I just pushed the
code into the master repository!.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Peter Clifton
On Thu, 2009-04-02 at 20:38 +0100, Peter Clifton wrote:
> On Thu, 2009-04-02 at 17:55 +0100, Peter Clifton wrote:
> > On Thu, 2009-04-02 at 17:47 +0100, Peter Clifton wrote:
> > 
> > > It is based on top of my local customisation patches, and the
> > > "before_pours" PCB+GL branch. The relevant patches could probably just
> > > be applied on top of the "before_pours" branch. (I've attached them).
> > 
> > I missed one.. this comes first:
> 
> Ok, if you have my repository checked out, it is the "better_drc_nogl"
> branch. (It was dead easy to make the graphic previews work in the non
> GL branch.).
> 
> The GL version is now rebased on top of that, and the appropriate canges
> rolled into the rest of the GL updates, so you want the "before_pours"
> branch as usual.

Ok.. now tidied up and pushed to the main PCB repository. Enjoy!
(And report bugs ;))

I also built the lesstif HID, and gave it a test drive to ensure the DRC
hadn't changed (other than some log messages which I changed in the
core).



-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Mark
On Thursday 02 April 2009 03:38:07 pm Peter Clifton wrote:
> Ok, if you have my repository checked out, it is the "better_drc_nogl"
> branch. (It was dead easy to make the graphic previews work in the non
> GL branch.).
>
> The GL version is now rebased on top of that, and the appropriate canges
> rolled into the rest of the GL updates, so you want the "before_pours"
> branch as usual.


Peter,

I checked out the latest from git and ran the Design Rule Checker many times.  
It keeps crashing PCB.  It did work once right after I turned off Thin Draw 
Poly but has crashed every time since.  After running it through gdb it looks 
like it is sending PolygonHoles() a null for the "range" value.

I've attached the debug.  Let me know if you want the layout.

-Mark
Program received signal SIGSEGV, Segmentation fault.
0x080a7d82 in PolygonHoles (polygon=0x86e57a0, range=0x0, callback=0x80cf630 
, user_data=0x8d22df8)
at polygon.c:1293
1293  if (pl->xmin > range->X2 || pl->xmax < range->X1 || pl->ymin > 
range->Y2 || pl->ymax < range->Y1)


(gdb) bt
#0  0x080a7d82 in PolygonHoles (polygon=0x86e57a0, range=0x0, 
callback=0x80cf630 , user_data=0x8d22df8)
at polygon.c:1293
#1  0x080cf678 in common_thindraw_pcb_polygon (gc=0x8d22df8, poly=0x86e57a0, 
clip_box=0x0)
at hid/common/draw_helpers.c:109
#2  0x080d35fa in ghid_thindraw_pcb_polygon (gc=0x8d22df8, poly=0x86e57a0, 
clip_box=0x0) at hid/gtk/gtkhid-main.c:986
#3  0x080834e2 in poly_callback (b=0x86e57a0, cl=0xbfde7954) at draw.c:2181
#4  0x080beced in __r_search (node=0x86e5a10, query=0x86e5a10, arg=0xbfde78ec) 
at rtree.c:539
#5  0x080bede3 in r_search (rtree=0x86e5a00, query=0x8c755b0, check_region=0, 
found_rectangle=0x8083380 ,
cl=0xbfde7954) at rtree.c:632
#6  0x08083e35 in DrawLayerGroup (group=5, screen=0x0) at draw.c:970
#7  0x080860c3 in hid_expose_callback (hid=0x8122700, region=0x0, item=0x0) at 
draw.c:443
#8  0x080e4f0a in ghid_render_pixmap (cx=, cy=, zoom=111, width=90, height=90,
depth=24) at hid/gtk/gui-render-pixmap.c:127
#9  0x080dc639 in ghid_violation_renderer_render (cell=0x847ee40, 
window=0x8603940, widget=0x839f670,
background_area=0xbfde7c14, cell_area=0xbfde7c24, expose_area=0xbfde7c34, 
flags=0) at hid/gtk/gui-drc-window.c:768
#10 0xb7b7b290 in gtk_cell_renderer_render () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb7d57c53 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#12 0x0847ee40 in ?? ()
#13 0x08603940 in ?? ()
#14 0x0839f670 in ?? ()
#15 0xbfde7c14 in ?? ()
#16 0xbfde7c24 in ?? ()
#17 0xbfde7c34 in ?? ()
#18 0x in ?? ()


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Peter Clifton
On Thu, 2009-04-02 at 17:55 +0100, Peter Clifton wrote:
> On Thu, 2009-04-02 at 17:47 +0100, Peter Clifton wrote:
> 
> > It is based on top of my local customisation patches, and the
> > "before_pours" PCB+GL branch. The relevant patches could probably just
> > be applied on top of the "before_pours" branch. (I've attached them).
> 
> I missed one.. this comes first:

Ok, if you have my repository checked out, it is the "better_drc_nogl"
branch. (It was dead easy to make the graphic previews work in the non
GL branch.).

The GL version is now rebased on top of that, and the appropriate canges
rolled into the rest of the GL updates, so you want the "before_pours"
branch as usual.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread DJ Delorie

> It works in the same way as the pinout / footprint preview widget,
> by temporarily diverting the GUI's zoom and rendering target. A bit
> of a kludge perhaps, but it works.

That's the right way to do it.  Now divert mouse/key events from those
mini-windows back to the main window and you can fix them right from
the dialog.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Peter Clifton
On Thu, 2009-04-02 at 17:47 +0100, Peter Clifton wrote:

> It is based on top of my local customisation patches, and the
> "before_pours" PCB+GL branch. The relevant patches could probably just
> be applied on top of the "before_pours" branch. (I've attached them).

I missed one.. this comes first:

>From decbc6413e59abbd3be940c76561ae06682e0477 Mon Sep 17 00:00:00 2001
From: Peter Clifton 
Date: Wed, 1 Apr 2009 13:45:11 +0100
Subject: [PATCH] Allow the DRC to call GUI specific hooks

---
 src/Makefile.am  |1 +
 src/action.c |2 +
 src/find.c   |   47 +++---
 src/gpcb-menu.res|1 +
 src/hid.h|   10 +++
 src/hid/batch/batch.c|3 +-
 src/hid/bom/bom.c|1 +
 src/hid/common/hidnogui.c|4 +-
 src/hid/gerber/gerber.c  |4 +-
 src/hid/gtk/gtkhid-main.c|   23 ++-
 src/hid/gtk/gui-config.c |2 +
 src/hid/gtk/gui-drc-window.c |  145 ++
 src/hid/gtk/gui.h|9 +++
 src/hid/lesstif/main.c   |3 +-
 src/hid/lpr/lpr.c|3 +-
 src/hid/nelma/nelma.c|3 +-
 src/hid/png/png.c|3 +-
 src/hid/ps/eps.c |4 +-
 src/hid/ps/ps.c  |3 +-
 19 files changed, 248 insertions(+), 23 deletions(-)
 create mode 100644 src/hid/gtk/gui-drc-window.c

diff --git a/src/Makefile.am b/src/Makefile.am
index 146fbb9..77e4467 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -241,6 +241,7 @@ LIBGTK_SRCS = \
 	hid/gtk/gui-dialog-print.c \
 	hid/gtk/gui-dialog-size.c \
 	hid/gtk/gui-dialog.c \
+	hid/gtk/gui-drc-window.c \
 	hid/gtk/gui-keyref-window.c \
 	hid/gtk/gui-library-window.c \
 	hid/gtk/gui-library-window.h \
diff --git a/src/action.c b/src/action.c
index 7b78fed..6e7af6f 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1746,6 +1746,8 @@ ActionDRCheck (int argc, char **argv, int x, int y)
 {
   int count;
 
+  /* TODO: Override some of these messages for a GUI driven DRC ? */
+
   Message (_("Rules are minspace %d.%02d, minoverlap %d.%d "
 	 "minwidth %d.%02d, minsilk %d.%02d\n"
 	 "min drill %d.%02d, min annular ring %d.%02d\n"),
diff --git a/src/find.c b/src/find.c
index 94ace4d..748d389 100644
--- a/src/find.c
+++ b/src/find.c
@@ -157,11 +157,18 @@ RCSID ("$Id$");
 #define	IS_PV_ON_PAD(PV,Pad) \
 	( IsPointInPad((PV)->X, (PV)->Y, MAX((PV)->Thickness/2 +Bloat,0), (Pad)))
 
-static char drc_dialog_message[289];
+static char drc_dialog_message[289] = {0,};
 static void
 reset_drc_dialog_message(void)
 {
-   drc_dialog_message[0] = 0;
+  if (gui->drc_gui != NULL)
+{
+  gui->drc_gui->reset_drc_dialog_message ();
+}
+  else
+{
+  drc_dialog_message[0] = 0;
+}
 }
 #ifdef __GNUC__
 static void append_drc_dialog_message(const char *fmt, ...)
@@ -170,15 +177,26 @@ static void append_drc_dialog_message(const char *fmt, ...)
 static void
 append_drc_dialog_message(const char *fmt, ...)
 {
-  size_t len = strlen (drc_dialog_message), 
- remained = sizeof (drc_dialog_message) - len - 1;
+  size_t len, remained;
   va_list ap;
+
   va_start (ap, fmt);
+
+  if (gui->drc_gui != NULL)
+{
+  gui->drc_gui->append_drc_dialog_messagev (fmt, ap);
+}
+  else
+{
+  len = strlen (drc_dialog_message);
+  remained = sizeof (drc_dialog_message) - len - 1;
 #ifdef HAVE_VSNPRINTF
-  vsnprintf (drc_dialog_message + len, remained, fmt, ap);
+  vsnprintf (drc_dialog_message + len, remained, fmt, ap);
 #else
-  vsprintf (drc_dialog_message + len, fmt, ap);
+  vsprintf (drc_dialog_message + len, fmt, ap);
 #endif
+}
+
   va_end (ap);
 }
 
@@ -194,9 +212,18 @@ static int
 throw_drc_dialog(void)
 {
   int r;
-  append_drc_dialog_message (DRC_CONTINUE); 
-  r = gui->confirm_dialog (drc_dialog_message, DRC_CANCEL, DRC_NEXT);
-  reset_drc_dialog_message();
+
+  if (gui->drc_gui != NULL)
+{
+  r = gui->drc_gui->throw_drc_dialog ();
+  gui->drc_gui->reset_drc_dialog_message ();
+}
+  else
+{
+  append_drc_dialog_message (DRC_CONTINUE);
+  r = gui->confirm_dialog (drc_dialog_message, DRC_CANCEL, DRC_NEXT);
+  reset_drc_dialog_message();
+}
   return r;
 }
 
@@ -3467,7 +3494,7 @@ DumpList (void)
 static Boolean
 DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
 {
-  reset_drc_dialog_message();
+//  reset_drc_dialog_message();
   if (PCB->Shrink != 0)
 {
   Bloat = -PCB->Shrink;
diff --git a/src/gpcb-menu.res b/src/gpcb-menu.res
index 5e56536..26e15e8 100644
--- a/src/gpcb-menu.res
+++ b/src/gpcb-menu.res
@@ -445,6 +445,7 @@ MainMenu =
   {Window
{"Library" DoWindows(Library) a={"i" "i"}}
{"Message Log" DoWindows(Log)}
+   {"DRC Check" DoWindows(DRC)}
{"Netlist" DoWindows(Netlist)}
{"Command Entry" Command() a={":" ":"}}
{"Pinout" Display(Pinout) a={"Shift-D" "Shiftd"}}
diff --git a/src/hid.h b/src/hid.h
index 6cceaaf..ee62369 100644
--- a/src/hid.h
+++ b/src/hid

Re: gEDA-user: DRC-GUI

2009-04-02 Thread Bert Timmerman
Hi Peter,

On Thu, 2009-04-02 at 03:34 +0100, Peter Clifton wrote:
> More eye-candy.. again, a real screen-shot, not a mockup.
> 
> http://www2.eng.cam.ac.uk/~pcjc2/geda/drc_for_real2.png
> 

Totally awesome !

Now to double-click on the thumbnail image to move the cursor on the
spot would be the icing on top of the cake :)

I'm looking forward for your patches / git fork.

Keep up the Good Work (TM).

Kind regards,

Bert Timmerman.

> Still not production ready though.. whenever I play with GL, I seem to
> have a knack of making enough errors in my code to find unusual X / 2D
> driver / Mesa bugs which crash the X server!).
> 
> The current implementation crashes (the X server) occasionally, and is
> somewhat slow at repainting the DRC window.
> 
> I can fix the slowness (and probably the crash) by pre-computing the
> little pixmaps showing the violations rather than drawing them each
> repaint, but then they are drawn in ugly colours due to the in-progress
> DRC check. The implementation I have now shows them as on the board, in
> real-time.
> 
> I say "fix the crash"... calling the GL routines to render once per
> violation is a lot less exposure to race conditions / other badness than
> calling them for every visible violation, for every repaint.
> 
> 
> Regards,
> 



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: DRC-GUI

2009-04-02 Thread Peter TB Brett
On Thursday 02 April 2009 03:34:28 Peter Clifton wrote:
> More eye-candy.. again, a real screen-shot, not a mockup.
>
> http://www2.eng.cam.ac.uk/~pcjc2/geda/drc_for_real2.png
>
> Still not production ready though.. whenever I play with GL, I seem to
> have a knack of making enough errors in my code to find unusual X / 2D
> driver / Mesa bugs which crash the X server!).

That looks absolutely stunning, nevertheless.

*jaw hits table*

  Peter


-- 
Peter Brett

Electronic Systems Engineer
Integral Informatics Ltd



signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: DRC-GUI

2009-04-01 Thread Peter Clifton
More eye-candy.. again, a real screen-shot, not a mockup.

http://www2.eng.cam.ac.uk/~pcjc2/geda/drc_for_real2.png

Still not production ready though.. whenever I play with GL, I seem to
have a knack of making enough errors in my code to find unusual X / 2D
driver / Mesa bugs which crash the X server!).

The current implementation crashes (the X server) occasionally, and is
somewhat slow at repainting the DRC window.

I can fix the slowness (and probably the crash) by pre-computing the
little pixmaps showing the violations rather than drawing them each
repaint, but then they are drawn in ugly colours due to the in-progress
DRC check. The implementation I have now shows them as on the board, in
real-time.

I say "fix the crash"... calling the GL routines to render once per
violation is a lot less exposure to race conditions / other badness than
calling them for every visible violation, for every repaint.


Regards,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user