Re: gEDA-user: gEDA interview with DJ at DevCon
On 27 October 2010 21:53, DJ Delorie d...@delorie.com wrote: for your amusement... http://www.eevblog.com/2010/10/27/eevblog-121-geda-interview-with-dj-delorie/ I probably got the odd fact or two wrong, but I think it went well... Thanks, DJ, I enjoyed watching this. Cheers Gareth ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Enhancements for gEDA/pcb G-code export
On Oct 27, 2010, at 6:33 PM, Markus Hitter m...@jump-ing.de wrote: Am 27.10.2010 um 22:57 schrieb Alberto Maccioni: Actually the code is already working; I'm glad the current code works for you, it doesn't for me. This is a problem with all software…. It is good you are making patches. But recall that in making you changes to support your equipment you might be breaking someone else's equipment. My suggestion is that the ability to specify settings predefined levels of machines. Either by making an addition to the current gcode exporter, (dropdown list) or by making a separate RepRap exporter. By factoring out common code and placing a clean API on it. So that RepRap users are not confused with 10 different gcode options they need to check. Please don't inconvenience other users by assuming that the gcode guys want fully compatible RepRap code cause my machine shop guys would be upset to not have the standard features, like variables. Please pick up what you think is useful, I'll maintain a patch for the remaining customisations in the RepRap Wiki. We need software working out of the box there, educating people about something is almost no option. You might want to make a github page (free) with a RepRap branch, a wiki is not a place for source control. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Enhancements for gEDA/pcb G-code export
On Thu, 2010-10-28 at 09:16 -0700, Steven Michalske wrote: My suggestion is that the ability to specify settings predefined levels of machines. Either by making an addition to the current gcode exporter, (dropdown list) or by making a separate RepRap exporter. By factoring out common code and placing a clean API on it. I'm not sure where the config storage would fit (perhaps hard-coded in the exporter for now), but a drop-down menu of pre-defined configs would probably be the best way to support this for now. Basically, I concur with Steven. First get some patches in to get the support for the type of gcode features you need. Try where possible to make those default to export the way things currently do (to avoid annoying existing users). Then we should look at a way to short-cut specifying a set of options for a preferred machine. Thinking of this on a generic exporter basis, something like this would also be really nice for other exporters, including postscript / PNG etc.. I don't expect it to be easy to implement generically, so I would not at all be opposed to just pushing something into the gcode exporter for now. We can always move to a more generic means to set export preferences for other exporters at a later stage. The important bit is that there is options for the exporter to do what you want, and secondly, that it is easy for people to choose them en-masse. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Wed, 2010-10-27 at 16:53 -0400, DJ Delorie wrote: for your amusement... http://www.eevblog.com/2010/10/27/eevblog-121-geda-interview-with-dj-delorie/ I probably got the odd fact or two wrong, but I think it went well... Sounded really good DJ, thanks for mentioning the GL stuff! I should really get that upstreamed at some point. Some of it has a way to come yet though, but it is not as far as it once was ;) It was a slight shame the video started with an advert clip showing Altium's 3D view in action. The guy who interviewed you has a pretty decent tutorial document on PCB design which the CUED people have had on their boot-able linux engineering CDs for a while now. I came across it again when searching to see if he had some commercial ties to Altium. (I didn't find any, other than that he clearly knows Altium and sometimes posts responses to users seeking help with it). I've been playing with performance optimisation recently, using VBOs to upload data to the GPU, caching polygon tesselation results from the sweepline algorithm, and generally playing around with how the branch renders things. I implemented a pixel shader to compute the shading for rounded line caps and filled circles / vias etc.. on the GPU, which seems like it might be a win. Rather than using a huge triangle fan to approximate the circular geometry, you just upload rectangular geometry with appropriate texture coordinates which map onto a (virtual) circle. __ |\ | _=== |\ | (E.g. a line has 6 triangles, |_\|===_|_\| not 2 + LOTS for the caps) The pixel shader computes the distance to of the interpolated texture coordinates to the circle origin and discards pixels where the distance is 1.0. This kind of progmatic texture allows the same geometry to render at all scales without loss of quality. I've tried rending board layers into FBO textures and texturing simple quads too. This is faster for some cases, but slower for others, and will trade GPU time for storage space. It allows a nice quick 3D view without constant re-rendering of all the geometry in every frame, but it does give some texture aliasing (I'm not generating mipmaps at this point). Really, at some perspectives it is better just to re-render onto the buffer, otherwise you need a large hi-res texture to get the detail. I think for 2D view (which is obviously a common case), we could potentially use the layer textures to speed up rendering, as a single pixel shader (or perhaps even fixed-function multi-texturing) can perform a blend of multiple (or all?) layers in one rendering pass. This should be a win for frames where cached layer textures can be used without needing to redraw them due to geometry changes. However, it will depend on the memory bandwidth / resources available to the texture sampler just how much (if anything) this gains you. Unfortunately, intel GPUs (as I have) aren't so performant, so it is a struggle to get really stellar performance from any method. If I use pixel shaders for drawing circular geometry, you get more over-fill from discarded pixels around edges of the objects. If you go triangle fans, you end up with huge amounts of geometry to send the GPU. It is pretty tricky to figure out where the GPU bottle-necks are too. It would of course be nice to support fall-backs for cards which don't support programmable pipeline stuff, so some sort of tri-fan / image texture based approach will always be necessary if pixel shaders aren't available. There are some changes I need to make in PCB's core to properly exploit the performance attainable by caching geometry in the GTK/GL (and perhaps other) HIDs: 1. Add specific damage calls which identify which layers and/or objects need redrawing. Caching by layer is an obvious thing to do, since we typically only edit layer by layer. Only adding / changing pins / vias will damage all layers at once. 2. Drop the core's blanket redraw area call to the GUI. It doesn't allow the GUI to cache unchanged geometry between frames. It should be simple to restore the existing behaviour of GUIs by having them issue their own invalidate / repaint / queue-repaint calls when they are notified of geometry changes. 3. Add hooks for GUIs to store cached data against objects. This might just mean adding HID hooks for the GUIs to be notified of object creation / deletion so they can maintain geometry caches hashed against object ID. For testing so far, I've just bastardised the core data-structures with some extra fields I needed. 4. Probably inevitably.. split more of the drawing / look+feel policy out of the core and into hid/common/ drawing helper functions. The GL HID has to copy and re-implement various drawing routines to circumvent incorrect ideas about drawing order the core will impose otherwise. In effect the GTK/GL GUI almost completely bypasses the core rendering for many things, so it would be nice to give other HIDs the flexibility to do so as well.
Re: gEDA-user: gEDA interview with DJ at DevCon
It was a slight shame the video started with an advert clip showing Altium's 3D view in action. Dave works for Altium :-) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 13:03 -0400, DJ Delorie wrote: It was a slight shame the video started with an advert clip showing Altium's 3D view in action. Dave works for Altium :-) I had half a suspicion. I know Altium are Australian and I thought his voice sounded familiar from some of their video demonstrations. Did you get any impression about their attitude to open-source / open file formats? (I get the context of your points on open file formats now ;)) I really like the look of Altium and its features. I strongly their product is one of the ones we should look at and strive towards, rather than trying to one-up KiCad / Eagle.. gEDA is a serious piece of CAD software, and I don't think Eagle is. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 18:31 +0100, Peter Clifton wrote: I really like the look of Altium and its features. I strongly their feel __^ product is one of the ones we should look at and strive towards, rather than trying to one-up KiCad / Eagle.. gEDA is a serious piece of CAD software, and I don't think Eagle is. KiCad is KiCad of course. Sadly, 3D view crashes when launched here, some kind of X11 / GLX / GL problem. I was trying to debug it and fix it for them (in the spirit of cooperation), but it looks like it might be some nasty WxWidgets internal bug - and I'm not familiar with Wx at all. Ubuntu has had a lot of bug reports recently about KiCad failing to start (due to a WxWidgets ABI problem), so at least there are users of KiCad out there. I notice a lot of bug reports / feature requests being filed (and ignored) on the Ubuntu bug trackers by users who probably don't appreciate that upstream is the best place to file those. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: KiCad's polygon library
Speaking of KiCad (and its source), I noticed they've found a GPL polygon boolean operations library which I'd not come across before. It looks like it has a neat solution to the snap-rounding / topology changing problem, which treats points which nearly touch as being coincident. Seems neat. Also, it would seem that it is possible for their package to detect circles / arcs approximated in the polygon data - which is cool. Anyway, for those interested: Boolean: GDSII viewer/editor + (boolean) operations on sets of 2d polygons. Boolean Web Site: http://boolean.klaasholwerda.nl/bool.html kbool is also used in wxArt2D see www.wxart2d.org the last version of kbool can be found on this site. It is based on sweep-line intersection algorithms (which we could benefit from, and I've not yet got my implementation of that - stolen from cairo, to work fully yet with our polygon routines). I will say that the website has a really nice explanation of how its algorithms work. Best wishes, -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: More OpenGL ideas
Spilling some ideas out whilst I remember them.. The layer textures could be A8 textures, rather then ARGB textures. (Saving 4x memory). This would require the combining to be done in a pixel shader which can colour each layer. I'm not yet sure how to do colouring of selected components (will probably require the geometry to be re-spat-out with flags on selected parts, or selected parts drawn separately). For finding connected tracks, I thought if might be nice to tag the vertices we emit with a netID number. I don't know how quickly we'd run out of IDs, but it shouldn't be a real issue. Basically then, if you can give the vertex shader a run-time uniform parameter for it to test against on each vertex and choose the colour to use. This lets you retain the same cached geometry no matter which trace you highlight. Selection is of course harder, as there are so many objects - and multiple objects can be selected at once. I would love to get to the point where hitting f on a track fades out the saturation / increases the opacity for non-found tracks around it. I want to make the renderer capable of such effects, and make the application of them adjustable. I'm sure some good usability / human interaction designers out there can come up with some awesome uses for such features. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
KiCad is KiCad of course. Sadly, 3D view crashes when launched here, some kind of X11 / GLX / GL problem. I was trying to debug it and fix it for them (in the spirit of cooperation), but it looks like it might be some nasty WxWidgets internal bug - and I'm not familiar with Wx at all. I've got a lot of experience with wxWidgets, I even have my name in the wxBook by Julian Smart the wxWidgets (known as wxWindows when he started the project, until Micro$oft threatened to sue him). The standard reply to bug reports bug reports is Recreate the problem in the Minimal Sample and send us a patch and a back trace. I went through this cycle yesterday so you can see an example here: http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265 The Minimal Sample is the smallest possible meaning for wx program you can create, a kind of 'Hello World' for wx. The two most common problems in wx are people trying to manipulate the GUI from other threads. This can not be done, you most post events to the GUI thread. This is not wx specific actually, just a general lack of understanding of how the underling system of Windows is not thread safe in many cases. The other common problem that causes a lot of crashes, mostly on exit, is to delete a dialog or a frame rather than 'destroy' it. If there are pending events meant for the dialog/frame that has been deleted, wx crashes, rather than assigning them to oblivion. I've never understood that part of the base design myself. Most other crashes are the type you see far to often, like buffer overflows, using deleted memory; the standard security risk stuff that doesn't get enough attention in the drive to ship code fast. Also note the comments under DJ's Video, how they most all complain about the lack of Windows version, even quoting the gEDA site saying Windows was not the focuses of the project. The focus of the project is getting work done to make shippable products, or education usage. The Tools to make Tools philosophy should have died a long time ago. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: KiCad's polygon library
On Thu, Oct 28, 2010 at 1:44 PM, Peter Clifton pc...@cam.ac.uk wrote: Speaking of KiCad (and its source), I noticed they've found a GPL polygon boolean operations library which I'd not come across before. Have you looked at the new one in Boost 1.4.4? http://www.boost.org/doc/libs/1_44_0/libs/polygon/doc/index.htm It looks like it has a neat solution to the snap-rounding / topology changing problem, which treats points which nearly touch as being coincident. Seems neat. Is this the same as the ' Welding Vertices' problem? Collapsing near points into a single polygon? ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Enhancements for gEDA/pcb G-code export
Hi, I've exported some g-code from one of my former projects as a test. I don't have a milling machine, but I'd like to see the result. Could you please point me a g-code viewer for Linux? Preferably debian. Thanks, Levente -- Levente Kovacs http://levente.logonex.eu ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
Did you get any impression about their attitude to open-source / open file formats? (I get the context of your points on open file formats now ;)) Dave was not at DevCon as an Altium engineer, and was very professional about not saying anything that might be construed as an Altium Statement. My open file format jabs are usually directed at Eagle, anyway. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: More OpenGL ideas
On Thu, Oct 28, 2010 at 06:52:16PM +0100, Peter Clifton wrote: The layer textures could be A8 textures, rather then ARGB textures. (Saving 4x memory). This would require the combining to be done in a pixel shader which can colour each layer. The fixed pipeline already multiplies the front color by the texture. Typically you set the color to 1,1,1 so you get the texture unmodified, but you could set it to a color and use a white texture. I'm not yet sure how to do colouring of selected components (will probably require the geometry to be re-spat-out with flags on selected parts, or selected parts drawn separately). If you remember where each component is in the VBO you can just draw the sub-array corresponding to selected component. You could use the same information to avoid drawing it plain or something like glPolygonOffset to overdraw the highlighted version. For finding connected tracks, I thought if might be nice to tag the vertices we emit with a netID number. I don't know how quickly we'd run out of IDs, but it shouldn't be a real issue. Every uniform and attribute is a float. If you use whole float numbers you'd only have 24 bits. If you carefully pack the data into the whole 32-bit float you could probably manage to use the exponent bits too. But you can always use a 2, 3 or 4 float attribute as well. -- Ben Jackson AD7GD b...@ben.com http://www.ben.com/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Enhancements for gEDA/pcb G-code export
Am 28.10.2010 um 20:48 schrieb Levente Kovacs: Could you please point me a g-code viewer for Linux? Preferably debian. I'm not aware of one, but EMC2 has a simulation mode: http://reprap.org/wiki/PCB_Milling#EMC2 Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Enhancements for gEDA/pcb G-code export
Am 28.10.2010 um 18:16 schrieb Steven Michalske: My suggestion is that the ability to specify settings predefined levels of machines. Either by making an addition to the current gcode exporter, (dropdown list) or by making a separate RepRap exporter. By factoring out common code and placing a clean API on it. For one, it's not only RepRap which doesn't understand the current advanced G-code, but many CNC machines in wide use. Tooling machines have a long life and 30 years ago the computing technology simply wasn't where it is today. That said, a general simple G-code vs. advanced G-code is a good idea. Simple works on all machines, advanced on modern machines only. Similar to PostScript level 2 vs. PostScript level 3. The actually machined result is always the same, the difference is in hand editing comfort of that G-code. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: Ben mode feature request
Hello! I just watched DJ's interview and the talk about ben mode export. I was amazed how nice pictures it produced. I also checked DJ's website and saw the tricks that he had already made to make real card. How long has this feature been there? Because I used something like version 2007 last time and now I've noticed some nice changes. I really love the snap to component lead feature in gschem. Anyway I started to think could it be possible to write tool that populates the PCB? First we know the footprint. There are the legs. Then we need case. Selecting from few different cases it could be possible to select desired case. Size could be little bit smaller than outline in footprint. And then the last thing is add text and resistor ribbons. This information is required before the picture is exported. And when we export image, these pictures are pasted on picture. Few lines of text and hell to code and even harder to implement. Has anyone already thought this kind of system? Hannu Vuolasaho ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Ben mode feature request
Anyway I started to think could it be possible to write tool that populates the PCB? First we know the footprint. There are the legs. Then we need case. Selecting from few different cases it could be possible to select desired case. Size could be little bit smaller than outline in footprint. And then the last thing is add text and resistor ribbons. This information is required before the picture is exported. And when we export image, these pictures are pasted on picture. In theory, the XYZR output (bom exporter) is enough to let you paste other pictures onto the pcb picture. However, there's the whole need a huge pile of pictures problem still. Then you'd annotate the footprints to include a photo name and perhaps some hook to fix it (like resistor stripes or number), some offset/rotation code, etc. Remember, features get added by the people with the time and desire to add them... ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: More OpenGL ideas
On Thu, 2010-10-28 at 11:59 -0700, Ben Jackson wrote: On Thu, Oct 28, 2010 at 06:52:16PM +0100, Peter Clifton wrote: The layer textures could be A8 textures, rather then ARGB textures. (Saving 4x memory). This would require the combining to be done in a pixel shader which can colour each layer. The fixed pipeline already multiplies the front color by the texture. Typically you set the color to 1,1,1 so you get the texture unmodified, but you could set it to a color and use a white texture. The object only gets one colour though.. I was talking about multi-texturing with (say) eight A8 textures, one representing each layer. Each would have to blend in its own colour, but given the assumption (for the most part true) that my layer images would be mono-coloured, storing the layers as RGBA is wasteful of memory and memory bandwidth. Notably, found / selected objects would have to be drawn / flagged separately I'm not yet sure how to do colouring of selected components (will probably require the geometry to be re-spat-out with flags on selected parts, or selected parts drawn separately). If you remember where each component is in the VBO you can just draw the sub-array corresponding to selected component. You could use the same information to avoid drawing it plain or something like glPolygonOffset to overdraw the highlighted version. Good point. Currently, the first object / polygon to put down copper in an area will fill in the stencil, so any subsequent selected object isn't drawn fully. (It is always occluded by the non-selected colour of overlapping objects drawn prior to it). (NB: The stencilling introduces that kind of z-order inversion). In my scheme, you would draw the selected objects first (marking the stencil), then subsequent over-drawing would not modify the colour buffer. This is partly why polygons are sub-composited separately from lines and other copper objects.. if we didn't, you'd not see the richness of the line routing when covered by a polygon. For finding connected tracks, I thought if might be nice to tag the vertices we emit with a netID number. I don't know how quickly we'd run out of IDs, but it shouldn't be a real issue. Every uniform and attribute is a float. If you use whole float numbers you'd only have 24 bits. If you carefully pack the data into the whole 32-bit float you could probably manage to use the exponent bits too. But you can always use a 2, 3 or 4 float attribute as well. Indeed. I'm not sure the limit on attributes, but I know the intel i965 driver will allocate enough message passing space in the GPU to pass as many varyings as you want. I wasn't explicitly aware we couldn't pass integer uniforms / varyings. I don't think we should / can / want to do any searching in each vertex shader, so any colour selection needs to be based on flag(s) or identifiers which can be tested in constant time. If we note where objects are in the VBO, we can just zap new flags into the vertex attributes defining colour. For the moment, I'm only caching VBO entries for polygon contours, other objects (aside from arcs) tend to be so simple it would not be worth the overhead unless we could cache an entire layer's worth of VBO. Even intel i965 has only just got NV_PRIMATIVE_RESTART support in mesa (and I'm not convinced it isn't just a hack to split up the arrays manually in mesa), so to split tristrip geometry I'm issuing degenerate vertices: one repeated start vertex and one repeated end-vertex. These create degenerate triangles with the previous / next strip of actual triangles, and should be culled pretty early in the graphics pipeline because they have zero area. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 13:58 -0400, Bob Paddock wrote: KiCad is KiCad of course. Sadly, 3D view crashes when launched here, some kind of X11 / GLX / GL problem. I was trying to debug it and fix it for them (in the spirit of cooperation), but it looks like it might be some nasty WxWidgets internal bug - and I'm not familiar with Wx at all. The standard reply to bug reports bug reports is Recreate the problem in the Minimal Sample and send us a patch and a back trace. I went through this cycle yesterday so you can see an example here: http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265 Thanks.. its actually kind of a neat idea, although potentially quite frustrating. Presumably they will accept triage / insight from a bug even if it isn't demonstrated in a minimal sample though? With KiCad, I'm not sure what the minimal setup to generate the OpenGL related error is. Basically the 3D viewer window causes the app to exit with this error: The program 'pcbnew' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 45001 error_code 9 request_code 137 minor_code 8) (gdb) bt #0 gdk_x_error (display=0x849d280, error=0xbfffc84c) at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkmain-x11.c:439 #1 0x0022eba9 in _XError (dpy=0x849d280, rep=0x8836aa8) at ../../src/XlibInt.c:1573 #2 0x0022b69a in handle_error (dpy=0x849d280, err=0x849d280, in_XReply=1) at ../../src/xcb_io.c:166 #3 0x0022bddf in _XReply (dpy=0x849d280, rep=0xbfffc9c0, extra=0, discard=0) at ../../src/xcb_io.c:623 #4 0x001dbeac in DRI2SwapBuffers (dpy=0x849d280, drawable=69208555, target_msc=0, divisor=0, remainder=0, count=0xbfffca68) at dri2.c:545 #5 0x001db3a4 in dri2SwapBuffers (pdraw=0x8b313d0, target_msc=0, divisor=0, remainder=0) at dri2_glx.c:553 #6 0x001b4337 in glXSwapBuffers (dpy=0x849d280, drawable=69208555) at glxcmds.c:730 #7 0x00316a2b in wxGLCanvas::SwapBuffers() () from /usr/lib/libwx_gtk2u_gl-2.8.so.0 #8 0x082a5f3e in Pcb3D_GLCanvas::Redraw(bool) () #9 0x0829f8e4 in Pcb3D_GLCanvas::OnPaint(wxPaintEvent) () #10 0x00890c2f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent), wxEvent) const () from /usr/lib/libwx_baseu-2.8.so.0 So.. something is upsetting DRI2 / OpenGL. However.. I fear that active discussion and debugging of KiCad bugs is a little OT for the geda-user list. I'd love to know what the problem was though, so I could play with the KiCad 3D viewer and get a feel for what is good / bad about it, and help inspire my own 3D efforts. The two most common problems in wx are people trying to manipulate the GUI from other threads. This can not be done, you most post events to the GUI thread. This is not wx specific actually, just a general lack of understanding of how the underling system of Windows is not thread safe in many cases. There is a lot of evil magic in DRI2 / OpenGL getting windows / pixbufs / etc.. It would be nice if it was just a threading issue, but I fear more likely is some kind of missing initialisation / proper setup of visuals. (Certainly some missing error checking at some stage!) Still, I might take a stab at finding a minimal Wx app which successfully uses OpenGL and see what looks different with KiCad. Might also be worth checking out their latest source and making sure they've not fixed it already! Best wishes, -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: KiCad 3D Viewer problem [was: Re: gEDA interview with DJ at DevCon]
On Thu, 2010-10-28 at 23:58 +0100, Peter Clifton wrote: The program 'pcbnew' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 45001 error_code 9 request_code 137 minor_code 8) (gdb) bt #0 gdk_x_error (display=0x849d280, error=0xbfffc84c) at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkmain-x11.c:439 #1 0x0022eba9 in _XError (dpy=0x849d280, rep=0x8836aa8) at ../../src/XlibInt.c:1573 #2 0x0022b69a in handle_error (dpy=0x849d280, err=0x849d280, in_XReply=1) at ../../src/xcb_io.c:166 #3 0x0022bddf in _XReply (dpy=0x849d280, rep=0xbfffc9c0, extra=0, discard=0) at ../../src/xcb_io.c:623 #4 0x001dbeac in DRI2SwapBuffers (dpy=0x849d280, drawable=69208555, target_msc=0, divisor=0, remainder=0, count=0xbfffca68) at dri2.c:545 #5 0x001db3a4 in dri2SwapBuffers (pdraw=0x8b313d0, target_msc=0, divisor=0, remainder=0) at dri2_glx.c:553 #6 0x001b4337 in glXSwapBuffers (dpy=0x849d280, drawable=69208555) at glxcmds.c:730 #7 0x00316a2b in wxGLCanvas::SwapBuffers() () from /usr/lib/libwx_gtk2u_gl-2.8.so.0 #8 0x082a5f3e in Pcb3D_GLCanvas::Redraw(bool) () #9 0x0829f8e4 in Pcb3D_GLCanvas::OnPaint(wxPaintEvent) () #10 0x00890c2f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent), wxEvent) const () from /usr/lib/libwx_baseu-2.8.so.0 So.. something is upsetting DRI2 / OpenGL. And for logging and fullness, I just spotted the following appearing in /var/log/Xorg.0.log when the program dies: [ 22155.171] (EE) intel(0): [DRI2] DRI2SwapBuffers: drawable has no back or front? Should give a decent hint as to what error paths to check. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 23:58 +0100, Peter Clifton wrote: The standard reply to bug reports bug reports is Recreate the problem in the Minimal Sample and send us a patch and a back trace. I went through this cycle yesterday so you can see an example here: http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265 Thanks.. its actually kind of a neat idea, although potentially quite frustrating. Presumably they will accept triage / insight from a bug even if it isn't demonstrated in a minimal sample though? Does this count... I built their example code here: http://wiki.wxwidgets.org/WxGLCanvas And it dies a horrible death with the same error. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, Oct 28, 2010 at 6:58 PM, Peter Clifton pc...@cam.ac.uk wrote: On Thu, 2010-10-28 at 13:58 -0400, Bob Paddock wrote: KiCad is KiCad of course. Sadly, 3D view crashes when launched here, some kind of X11 / GLX / GL problem. I was trying to debug it and fix it for them (in the spirit of cooperation), but it looks like it might be some nasty WxWidgets internal bug - and I'm not familiar with Wx at all. The standard reply to bug reports bug reports is Recreate the problem in the Minimal Sample and send us a patch and a back trace. I went through this cycle yesterday so you can see an example here: http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265 Thanks.. its actually kind of a neat idea, although potentially quite frustrating. Presumably they will accept triage / insight from a bug even if it isn't demonstrated in a minimal sample though? A patch to the Minimal Sample generally gets an immediate response, and frequently an immediate fix. Anything else gets one of the following: A) Demonstrate the problem in the Minimal Sample. B) Yes, looks like you found a bug, please debug it, and tell us how to fix it with a patch. C) Yes, you found a problem, but I'm [not me] to busy to fix it right now, please create a bug report on the Patch Tracker. D) Do this: [something] and it will fix your problem. #7 0x00316a2b in wxGLCanvas::SwapBuffers() () from /usr/lib/libwx_gtk2u_gl-2.8.so.0 #8 0x082a5f3e in Pcb3D_GLCanvas::Redraw(bool) () #9 0x0829f8e4 in Pcb3D_GLCanvas::OnPaint(wxPaintEvent) () #10 0x00890c2f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent), wxEvent) const () from /usr/lib/libwx_baseu-2.8.so.0 I don't understand whythis is AppConsole from wxBase. I'd expect AppGUI. Also you want to be using 2.8.11. 2.9.x is not ready for usage yet. However.. I fear that active discussion and debugging of KiCad bugs is a little OT for the geda-user list. I'd love to know what the problem was though, so I could play with the KiCad 3D viewer and get a feel for what is good / bad about it, and help inspire my own 3D efforts. Perhaps, but its been on my To Do list for a long time to do a wxWidgets port of PCB. Take a look at this project for some example GL code in wxWidgets: http://code.google.com/p/toped/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
Does this count... http://wiki.wxwidgets.org/WxGLCanvas Proably not. This would be the best place: http://docs.wxwidgets.org/trunk/page_samples.html#page_samples_opengl Bugs found in trunk get a lot more attention. And it dies a horrible death with the same error. (wxFrame *) NULL doesn't really make any sense, but it should not cause a problem. Nothing else at the wiki jumped out at me. I'll try to make some time on the weekend to try and build the sample. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 20:15 -0400, Bob Paddock wrote: The standard reply to bug reports bug reports is Recreate the problem in the Minimal Sample and send us a patch and a back trace. I went through this cycle yesterday so you can see an example here: http://article.gmane.org/gmane.comp.lib.wxwindows.general/71265 Thanks.. its actually kind of a neat idea, although potentially quite frustrating. Presumably they will accept triage / insight from a bug even if it isn't demonstrated in a minimal sample though? Fixed the KiCad crash now: https://bugs.edge.launchpad.net/kicad/+bug/648289/comments/10 Their 3D view is nice (and quick - for a board with 3 traces on it!) I'm not knocking it... just that I don't have a decent complex design to try it on. A patch to the Minimal Sample generally gets an immediate response, and frequently an immediate fix. Anything else gets one of the following: A) Demonstrate the problem in the Minimal Sample. B) Yes, looks like you found a bug, please debug it, and tell us how to fix it with a patch. C) Yes, you found a problem, but I'm [not me] to busy to fix it right now, please create a bug report on the Patch Tracker. D) Do this: [something] and it will fix your problem. Sounds about as helpful as the GTK lot ;) I'm not sure the bug is a Wx bug or a KiCad bug, but it appears that WxWidgets is not giving double-buffered GL visuals by default - even though the docs suggest that it should. A subsequent call to SwapBuffers() explodes. #8 0x082a5f3e in Pcb3D_GLCanvas::Redraw(bool) () #9 0x0829f8e4 in Pcb3D_GLCanvas::OnPaint(wxPaintEvent) () #10 0x00890c2f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent), wxEvent) const () from /usr/lib/libwx_baseu-2.8.so.0 I don't understand whythis is AppConsole from wxBase. I'd expect AppGUI. Also you want to be using 2.8.11. 2.9.x is not ready for usage yet. I'm using 2.8.11, some of the KiCad code was checking for 2.9.x, but part of my fix was to change that to testing for 2.8.x. (The new API seems to be present and to work, although it might have been introduced in a minor version I guess). http://code.google.com/p/toped/ Thanks for the link. I reproduced the bug in the very simple example I saw before, and it was due to the fact they weren't passing their arguments into the WxGLCanvas constructor. Similarly, KiCad don't specify any parameters of the visual they would like, then make an assumption it was double-buffered without requesting that. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, Oct 28, 2010 at 1:03 PM, DJ Delorie d...@delorie.com wrote: It was a slight shame the video started with an advert clip showing Altium's 3D view in action. Dave works for Altium :-) That explains something that I did not understand at Devcon. Dave kept trying to bring up a picture of Nick Martin, the founder of Altium, to show me, but because of poor connectivity there he could never get it. He kept telling me that I looked like Nick. Click on his link here to see picture: http://www.altium.com/company/management-team/en/management-team_home.cfm I thought Nick's picture looked like my dad actually, but my wife agrees with Dave. DJ, what do you think, as we spent a lot of time together there? -- http://blog.softwaresafety.net/ http://www.designer-iii.com/ http://www.wearablesmartsensors.com/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
On Thu, 2010-10-28 at 20:29 -0400, Bob Paddock wrote: Nothing else at the wiki jumped out at me. I'll try to make some time on the weekend to try and build the sample. They didn't bother passing their args constructor parameter into the parent class (wxGLCanvas) constructor. On my machine at least, this results in WxWidgets assigning a single-buffered OpenGL visual, and death upon the SwapBuffers() call. I'm sure my OpenGL code makes all sorts of unreasonable assumptions about features I use too.. without properly checking / asking for them. (Off the top of my head... FBOs, VBOs, pixel shaders, non power of 2 textures etc..) -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: More OpenGL ideas
Peter Clifton wrote: I would love to get to the point where hitting f on a track fades out the saturation / increases the opacity for non-found tracks around it. I want to make the renderer capable of such effects, and make the application of them adjustable. I'm sure some good usability / human interaction designers out there can come up with some awesome uses for such features. How about some low hanging fruit in the mean time? * Always highlight the object a left mouse click would refer to. This is done by many CAD applications. It would make many GUI actions more predictable to newbies (and evveryone else, too). I always have to tell newbies more than once, that they don't have to select before move, or delete. * Even lower hanging: Change the mouse cursor on more events than just end-of-track. Polygon corners, straight segments, components, text,... They all could have specific icons. * Add handles to selected objects. Again, a wide spread UI technique for 2D manipulation. While dreaming about GUI fatures: I have mixed emotions on the info pop-ups. It is nice to just let the mouse hover to receive the information. On the other hand, the text pops up exactly where I was just working. So it is a bit distracting. How about some kind of permanent detached status window? ---)kaimartin(--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gEDA interview with DJ at DevCon
DJ, what do you think, I don't think Dave looks anything like your wife... I see the resemblance between you and Nick, though, but it's minor. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: More OpenGL ideas
On Fri, 2010-10-29 at 02:44 +0200, kai-martin knaak wrote: How about some low hanging fruit in the mean time? * Always highlight the object a left mouse click would refer to. This is done by many CAD applications. It would make many GUI actions more predictable to newbies (and evveryone else, too). I always have to tell newbies more than once, that they don't have to select before move, or delete. +1, have wanted to do that.. just never done it * Even lower hanging: Change the mouse cursor on more events than just end-of-track. Polygon corners, straight segments, components, text,... They all could have specific icons. That is a core PCB thing, not something I'll likely get to immediately. +1 on the idea though. * Add handles to selected objects. Again, a wide spread UI technique for 2D manipulation. Quite possibly +1, although it would have to be up to each GUI to render them in my opinion. While dreaming about GUI fatures: I have mixed emotions on the info pop-ups. It is nice to just let the mouse hover to receive the information. On the other hand, the text pops up exactly where I was just working. So it is a bit distracting. How about some kind of permanent detached status window? Would be nice I guess. The info windows were just a little hack to see what they would look like. As they stand though.. if they provided seriously useful information, it would be nice to activate them with a key-press so you don't become unproductive whilst hovering and waiting for the info window to appear. -- 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!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user