Re: gEDA-user: Photo mode to the rescue...

2010-09-07 Thread Vanessa Ezekowitz
On Mon, 6 Sep 2010 22:18:18 -0400
DJ Delorie d...@delorie.com wrote:

  How about this: Let footprints contain a file name of an macro image
  from the top. Then, the photo mode could use the image to render a 
  populated board. ;-)
 
 I thought of that, but you need to be able to correctly align the
 photo with the rotated/positioned element footprint.

I like this idea actually.  One way it might work is to take a page from photo 
panorama software - use the idea of control points [1].  If I could code, I'd 
implement it as a separate utility, if not as part of of PCB.  Here is how I 
would do it (lots of rambling from a dreamer follows :-) )...

Step 1:  Create the footprint and save it in the usual way - either with a text 
editor, some kind of script or tool, or using PCB.

Step 2: Launch the control point editor.  The first thing it would do before 
spawning the actual editor window is to pop up a dialog to let you choose the 
footprint file and image file to be loaded, with Forward and Cancel 
buttons.  Next to the image selector should be an option to rotate the image 
90/180/270 degrees before loading.  Once those are set, Forward should bring 
the user to the editor window, which I could see being divided into four parts:

* Upper left:  the footprint as it would be rendered with PCB's photo 
exporter, with the image overlaid on top of it and slightly translucent.  A 
slider bar to the left of this part of the window would control the opacity of 
the overlaid image.

* Upper Right:  the footprint as seen in the user's normal PCB environment.  If 
any control points have been set, their marks would be displayed as + symbols 
or something similar.

* Lower Right:  the original image, with corresponding control point marks 
displayed, if any.

Footprints and images should default to centered and scaled-to-fit each of 
their respective sections (unless the footprint already has control points, in 
which case the image in the upper left should be scaled and positioned 
accordingly).  All three sections should respond to the user's normal mouse and 
keyboard settings for pan and zoom thereafter.  I'm not sure how this will mesh 
with the processing that is to be done on the overlay image in the upper left - 
maybe pre-render the image according to the control points, and display that.

* Lower left:  The current list of control points followed by buttons marked 
something like Show/Hide #, Delete, Accept, Preview,  and Save.

Step 3:  Add and edit new control points.  The user should be able to click in 
either of the two right hand sections to set a mark in each.  Any click in 
either section should move the mark in that section to the new spot.  A 
click-and-drag should also be possible.  Click back and forth between the two 
sections as needed, until both marks are just right.  Click Accept to add 
these two marks to the list of control points at the lower left.

If at any point the user sets a new mark in only one of the two right-hand 
sections, and then tries to click and drag on an older mark in either section, 
the new mark should be discarded, and the older mark should be moved per the 
user's request.

If the user has set new marks in *both* sections, the new marks should both be 
automatically added to the control point list, and the older mark should be 
moved per the user's request.

The user should be able to click and drag to move either of the two 
corresponding older marks back and forth as needed, and should click Accept 
to commit the changes.  If they don't, their next click other than a 
click-and-drag of these two older marks should cause the changes to be thrown 
out, and a new mark to be set .

When the user is editing an older mark, the corresponding control point should 
be highlighted in the list (and brought into view if it is scrolled off).  When 
the user clicks on a control point in the list, the corresponding marks on the 
right should be highlighted (but without discarding any new marks that may be 
in progress).  If the user was editing an older mark and they click a different 
control point in the list, the change they were making should be discarded.

Depending on the amount of distortion in the image, create maybe 8 to 12 
control points around the periphery of the component.  More is better, to a 
point, but at any rate one needs to account for (ideally small variations in) 
scale, position, rotation, perspective, and lens distortion (e.g. fisheye).

Step 4:  Click the Preview button to refresh the footprint/image overlay 
using the current list of control points.  If it needs to be tweaked, to back 
to Step 3.  The Delete button would remove whatever control point is 
highlighted in the list.  If the image overlay looks good, click Save to 
overwrite the footprint that was loaded, with the new control points (and the 
rotation flag set in the load files dialog).  At this point, I guess just 
exit the program.


[1] For those here who don't work with photo 

Re: gEDA-user: Photo mode to the rescue...

2010-09-07 Thread John Luciani
On Mon, Sep 6, 2010 at 10:09 PM, Eric Brombaugh ebrombau...@cox.net wrote:

 Whenever I post pix from photo mode I always get questions about what tool I
 used to do them. Surprising that none of the big pro tools out there provide
 that.  Who says OSS apps always follow the lead of the proprietary SW world?

I have heard the same positive comments from a number of people too.

Being able to get a quality rendering of the PCB from the command line
is extremely convenient.

(* jcl *)


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


Re: gEDA-user: Photo mode to the rescue...

2010-09-07 Thread Kai-Martin Knaak
DJ Delorie wrote:

 
 How about this: Let footprints contain a file name of an macro image
 from the top. Then, the photo mode could use the image to render a 
 populated board. ;-)
 
 I thought of that, but you need to be able to correctly align the
 photo with the rotated/positioned element footprint.

PCB knows about the rotation of a footprint and the position of its 
origin/handle. So it needs the coordinates of point in the photo that 
corresponds to the origin. In addition, a scaling information may be 
required. All of this additional information would fit nicely in the 
package concept I am about to propose...


 BTW, shadows can be rendered with a little image-magick: 
 
 That kind of logic should be in the PNG exporter...

True. 
But it was way easier for me to search the web for convert utility options.

---)kaimartin(---
-- 
Kai-Martin Knaak  tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik  fax: +49-511-762-2211 
Welfengarten 1, 30167 Hannover   http://www.iqo.uni-hannover.de
GPG key:http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmkop=get



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


gEDA-user: Photo mode to the rescue...

2010-09-06 Thread DJ Delorie

I needed an official photo of a board for a presentation, but the
boards aren't back from assembly yet.  So I used a photo-mode export
of the PCB, and a photograph of a home-etched prototype, and 1-2 hours
of GIMP work...

http://www.delorie.com/pcb/tmp/photo-mode-plus-plus.html

(yes, it's part of a larger board)


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


Re: gEDA-user: Photo mode to the rescue...

2010-09-06 Thread kai-martin knaak
DJ Delorie wrote:

 
 I needed an official photo of a board for a presentation, but the
 boards aren't back from assembly yet.  So I used a photo-mode export
 of the PCB, and a photograph of a home-etched prototype, and 1-2 hours
 of GIMP work...
 
 http://www.delorie.com/pcb/tmp/photo-mode-plus-plus.html

Sweet! 
How about this: Let footprints contain a file name of an macro image
from the top. Then, the photo mode could use the image to render a 
populated board. ;-)

BTW, shadows can be rendered with a little image-magick: 

convert /tmp/out.png \
  \( +clone -background black -shadow 75x20+20+20 \)  +swap \
  -background white \
  -layers merge \
  -resize 50% \
  $OUTPNG_BOTTOM

result:
http://bibo.iqo.uni-hannover.de/dokuwiki/lib/exe/detail.php?id=eigenbau%3Aphotodiodenverstaerker_20_mhzmedia=eigenbau:pd-ac:v3:pd-ac_layout.png

---)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: Photo mode to the rescue...

2010-09-06 Thread Eric Brombaugh

On 09/06/2010 06:51 PM, DJ Delorie wrote:


I needed an official photo of a board for a presentation, but the
boards aren't back from assembly yet.  So I used a photo-mode export
of the PCB, and a photograph of a home-etched prototype, and 1-2 hours
of GIMP work...

http://www.delorie.com/pcb/tmp/photo-mode-plus-plus.html


Whenever I post pix from photo mode I always get questions about what 
tool I used to do them. Surprising that none of the big pro tools out 
there provide that.  Who says OSS apps always follow the lead of the 
proprietary SW world?


Eric


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


Re: gEDA-user: Photo mode to the rescue...

2010-09-06 Thread DJ Delorie

 How about this: Let footprints contain a file name of an macro image
 from the top. Then, the photo mode could use the image to render a 
 populated board. ;-)

I thought of that, but you need to be able to correctly align the
photo with the rotated/positioned element footprint.

 BTW, shadows can be rendered with a little image-magick: 

In my case, shadows were rendered by my camera's flash :-)

 BTW, shadows can be rendered with a little image-magick: 

That kind of logic should be in the PNG exporter...


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