Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
Just proof of concept stuff... http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/ There isn't anything clever here.. just the same PCB+GL translucent rendering I had before, but with a 3D virtual trackball to rotate the viewport. Very cool! How do you set the origin for the viewport? One thing you might want to do is to provide a number box for azimuth, elevation, and z-angle, and z-distance (optional, for zoom) from the origin to the camera. That's the easiest way to reset your view when things get squirrelly from the oval graphic control or revisit an angle that you liked previously. -Ethan ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
On Wed, 2009-10-14 at 07:54 -0400, Ethan Swint wrote: Just proof of concept stuff... http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/ There isn't anything clever here.. just the same PCB+GL translucent rendering I had before, but with a 3D virtual trackball to rotate the viewport. Very cool! How do you set the origin for the viewport? The origin for rotation is the centre of the visible screen. The old pan and zoom actions (scroll bars etc..) are used to adjust the piece of the board being previewed. Still a bit of a mix of paradigms, (2D + 3D), but it seems to work well enough for a demo. One thing you might want to do is to provide a number box for azimuth, elevation, and z-angle, and z-distance (optional, for zoom) from the origin to the camera. That's the easiest way to reset your view when things get squirrelly from the oval graphic control or revisit an angle that you liked previously. Good idea, thanks. Btw.. here are the diffstats - I was surprised how little went into the 3D, and how much the trackball stuff. Fortunately I didn't have to write the src/hid/common/trackball.[ch] stuff!: commit e51da0c0c469a172ee0785569e24031b771bf19d Author: Peter Clifton pc...@cam.ac.uk Date: Wed Oct 14 14:43:27 2009 +0100 Shiny 3D eye-candy Experiments in progress - don't expect this to work yet! src/draw.c | 88 ++- src/hid/gtk/gtkhid-main.c | 22 ++- src/hid/gtk/gui-output-events.c | 130 +-- 3 files changed, 146 insertions(+), 94 deletions(-) commit 3937d586f92bad93f657945a39af7ce14a3f4521 Author: Peter Clifton pc...@cam.ac.uk Date: Wed Oct 14 14:43:21 2009 +0100 Add support for depth to triangle rendering routines. Nasty global depth_state variable should be replaced! src/hid/common/hidgl.c |9 - src/hid/common/hidgl.h |7 ++- 2 files changed, 14 insertions(+), 2 deletions(-) commit cbed9fbbee5a189d574575fc2bb8ba05d1c8bb3c Author: Peter Clifton pc...@cam.ac.uk Date: Wed Oct 14 14:43:19 2009 +0100 Add debug catch to triangle handling If for any reason we are about to run off the end of the triangle array, deliberately segfault so gdb can catch where. src/hid/common/hidgl.h |4 1 files changed, 4 insertions(+), 0 deletions(-) commit 4f134e44178d857a053b357a60a8835c1e7c8270 Author: Peter Clifton pc...@cam.ac.uk Date: Wed Oct 14 14:40:48 2009 +0100 Use trackball to allow rotation of 3D view src/hid/gtk/gui-output-events.c | 64 +++--- src/hid/gtk/gui-top-window.c|9 +- src/hid/gtk/gui.h |2 + 3 files changed, 62 insertions(+), 13 deletions(-) commit d4095396743490248f7530704b36502a5b28feff Author: Peter Clifton pc...@cam.ac.uk Date: Wed Oct 14 14:40:47 2009 +0100 Add virtual trackball code src/Makefile.am |7 +- src/hid/common/trackball.c | 324 + src/hid/common/trackball.h | 78 ++ src/hid/gtk/gui-trackball.c | 334 +++ src/hid/gtk/gui-trackball.h | 66 + 5 files changed, 808 insertions(+), 1 deletions(-) Best wishes, Peter. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
WOW, that looks nice! And having that might help me to remember that PCB keeps defaulting to putting the rat lines on the component side for a single sided board, so when I finally produce the board, I have to turn it over and flip all the components. Mike ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
On Wed, 2009-10-14 at 09:36 -0700, Mike Bushroe wrote: WOW, that looks nice! And having that might help me to remember that PCB keeps defaulting to putting the rat lines on the component side for a single sided board, so when I finally produce the board, I have to turn it over and flip all the components. Mike Rat lines have no default layer, they are just drawn on top of which ever view is shown. I wonder if the issue you've noted is due to the fact that layer 1, the default selected drawing layer is component. Switching to layer 2 solder before drawing any tracks is probably what you need to do. Best wishes, Peter C. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
Just proof of concept stuff... http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/ There isn't anything clever here.. just the same PCB+GL translucent rendering I had before, but with a 3D virtual trackball to rotate the viewport. The other kludging for these demos is some code to guess at a Z-value for various rendered layers, repeat drawing of pins + vias on each layer etc.. this is really crying out for some better way of some extra information in the layer stack. Btw.. the white ellipse on the left-hand bar is my 3D trackball sphere - I left it as a separate control for now. Code is on repo.or.cz local_customisation_no_pours branch if anyone is interested. Also.. I've rebased my branches (including the more established PCB+GL code) on PCB's git HEAD. There was also a fix for a crasher bug which just went in, so anyone using PCB+GL might want to update. (before_pours branch). Best wishes, Peter C. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy
Sweet! I wonder if we can add some thickness and get a ben mode style 3-D image? ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user