On Thu, May 1, 2008 at 2:22 PM, David Griffith <[EMAIL PROTECTED]> wrote:
>
> On Wed, 30 Apr 2008, John Luciani wrote:
>
>  > On Wed, Apr 30, 2008 at 7:48 PM, DJ Delorie <[EMAIL PROTECTED]> wrote:
>  >
>  > >  Note: radial layouts like this really want to be done by a perl script
>  > >  or other program, which can position the pins more precisely.
>  >
>  > I could not agree more ;-)
>  >
>  > I have a script that creates a footprint for a Belton VT8 tube
>  > socket at ---
>  >
>  > http://www.luciani.org/geda/pcb/pcb-perl-library.html
>  >
>  > The script could be easily modified to create this rotary switch.
>
>  I'm perusing that script right now.  I'm halfway done on the outer
>  diameter.  What units of length are you using there?  Do you have any
>  hints on placing the inner four pins and the locking lug?

All the units are 'mm'. This is setup in the element_begin
call ---

  $Pcb -> element_begin(description => 'TH',
                          output_file => "tmp/" . &package_name(%f),
                          dim   => 'mm',
                          pin_one_square => 1);

I would add a second loop with a different radius.

The first loop could be ---

    my $angle = 0;
    foreach (1..8) {
        $pin_num = $_;
        &place_pin(radius => $radius1,
                   angle => $angle,
                   pad_thickness => $f{pad_thickness},
                   drill_hole => $f{drill_hole},
                   pin_number => $pin_num);
        $angle += $delta_angle1;
    }

The second loop could be

    $angle = 0;
    foreach (9..12) {
        $pin_num = $_;
        &place_pin(radius => $radius2,
                   angle => $angle,
                   pad_thickness => $f{pad_thickness},
                   drill_hole => $f{drill_hole},
                   pin_number => $pin_num);
        $angle += $delta_angle2;
    }

IIRC the lug could be done with a call to &place_pin with a different
radius and angle.

(* jcl *)


-- 
http://www.luciani.org


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

Reply via email to